Re: [HACKERS] WaitLatch

2010-12-13 Thread Robert Haas
On Mon, Dec 13, 2010 at 5:48 AM, aaliya zarrin  wrote:
> drainSelfPipe() function will read the data and remove it from the
> descriptor?

Yes...

> Coz the signal (SIGUSR1) is writing sata to selfPipe descriptor but unable
> to wake up latch on select system call.

The signal won't cause the select() to return, but the byte that the
signal handler writes to the self-pipe ought to make it return.

> Data is not avaialable at select in WaitLatch fun. Coz it is read by
> drailSelfPipe().

I'm not sure what you're talking about here.  drainSelfPipe() is
called before calling SELECT.  As soon as a self-pipe byte is written,
the SELECT will return.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] WaitLatch

2010-12-13 Thread aaliya zarrin
Hi All,

drainSelfPipe() function will read the data and remove it from the
descriptor?

Coz the signal (SIGUSR1) is writing sata to selfPipe descriptor but unable
to wake up latch on select system call.
Data is not avaialable at select in WaitLatch fun. Coz it is read by
drailSelfPipe().

So How will the SIGUSR1 can wake up the latch(select in WaitLatch Fun)??

Plz Reply..

-- 
Thanks & Regards,

Aaliya Zarrin
(+91)-9160665888