Re: [HACKERS] Synchronous replication: sleeping

2008-12-08 Thread Fujii Masao
Hi, On Mon, Dec 8, 2008 at 10:36 PM, Tom Lane <[EMAIL PROTECTED]> wrote: > Martijn van Oosterhout <[EMAIL PROTECTED]> writes: >> On Mon, Dec 08, 2008 at 01:12:39PM +0200, Heikki Linnakangas wrote: >>> BTW, on what platforms signal doesn't interrupt sleep? > >> In theory, none. > > In practice, the

Re: [HACKERS] Synchronous replication: sleeping

2008-12-08 Thread Tom Lane
Martijn van Oosterhout <[EMAIL PROTECTED]> writes: > On Mon, Dec 08, 2008 at 01:12:39PM +0200, Heikki Linnakangas wrote: >> BTW, on what platforms signal doesn't interrupt sleep? > In theory, none. In practice, they exist. In particular I can demonstrate the issue on HPUX 10.20. I also dispute

Re: [HACKERS] Synchronous replication: sleeping

2008-12-08 Thread Martijn van Oosterhout
On Mon, Dec 08, 2008 at 01:12:39PM +0200, Heikki Linnakangas wrote: > If a signal is received just before pq_wait call, after checking > replication_requested, pq_wait won't be interrupted and will wait up to > a second before responding to it. > > BTW, on what platforms signal doesn't interrupt

[HACKERS] Synchronous replication: sleeping

2008-12-08 Thread Heikki Linnakangas
In walsender, in the main loop that waits for backend requests to send WAL, there's this comment: + /* +* Nap for the configured time or until a request arrives. +* +* On some platforms, signals won't interrupt the sleep. To ensure