Re: [HACKERS] Latches, loop and exit

2010-09-15 Thread Simon Riggs
On Wed, 2010-09-15 at 09:40 +0300, Heikki Linnakangas wrote: > > However, if the following clause is ever invoked, then the loop does > > have problems and we leave when not caught up. > > > > if (!PostmasterIsAlive(true)) > > exit(1); > > As the comment above that says, that's just an escape

Re: [HACKERS] Latches, loop and exit

2010-09-14 Thread Heikki Linnakangas
On 15/09/10 09:19, Simon Riggs wrote: On Wed, 2010-09-15 at 10:33 +0900, Fujii Masao wrote: On Wed, Sep 15, 2010 at 12:14 AM, Simon Riggs wrote: Like latches, nice one. The way the loop in WalSender now happens it won't send any outstanding WAL if a shutdown is requested while it is waiting.

Re: [HACKERS] Latches, loop and exit

2010-09-14 Thread Fujii Masao
On Wed, Sep 15, 2010 at 3:19 PM, Simon Riggs wrote: > For SIGUSR2, you're right. > > However, if the following clause is ever invoked, then the loop does > have problems and we leave when not caught up. > > if (!PostmasterIsAlive(true)) >        exit(1); In normal shutdown case, that clause is no

Re: [HACKERS] Latches, loop and exit

2010-09-14 Thread Simon Riggs
On Wed, 2010-09-15 at 10:33 +0900, Fujii Masao wrote: > On Wed, Sep 15, 2010 at 12:14 AM, Simon Riggs wrote: > > > > Like latches, nice one. > > > > The way the loop in WalSender now happens it won't send any outstanding > > WAL if a shutdown is requested while it is waiting. > > > > That probably

Re: [HACKERS] Latches, loop and exit

2010-09-14 Thread Fujii Masao
On Wed, Sep 15, 2010 at 12:14 AM, Simon Riggs wrote: > > Like latches, nice one. > > The way the loop in WalSender now happens it won't send any outstanding > WAL if a shutdown is requested while it is waiting. > > That probably needs to change and we'd do similarly in other procs. Really? ISTM t

[HACKERS] Latches, loop and exit

2010-09-14 Thread Simon Riggs
Like latches, nice one. The way the loop in WalSender now happens it won't send any outstanding WAL if a shutdown is requested while it is waiting. That probably needs to change and we'd do similarly in other procs. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Development, 24x7 Su