Re: WaitLatch

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: aaliya zarrin <aaliya(dot)zarrin(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: WaitLatch
Date: 2010-12-13 20:30:22
Message-ID: AANLkTim1R0Yso+fgZrf4KXfEY70cw50fcKaTwE40sChP@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 13, 2010 at 5:48 AM, aaliya zarrin <aaliya(dot)zarrin(at)gmail(dot)com> 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

In response to

  • WaitLatch at 2010-12-13 10:48:00 from aaliya zarrin

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-12-13 20:32:23 Re: pg_is_in_recovery=1
Previous Message Dmitriy Igrishin 2010-12-13 20:14:17 Re: hstores in pl/python