Re: [PATCHES] [HACKERS] Archiver behavior at shutdown

2008-01-09 Thread Simon Riggs
On Wed, 2008-01-09 at 10:15 -0500, Tom Lane wrote: > Simon Riggs <[EMAIL PROTECTED]> writes: > > Not sure why this hasn't being applied yet for 8.3 > > Because it doesn't fix the problem ... which is that the postmaster > kills the archiver (and the stats collector too) at what is now the > wrong

Re: [PATCHES] [HACKERS] Archiver behavior at shutdown

2008-01-09 Thread Tom Lane
Simon Riggs <[EMAIL PROTECTED]> writes: > Not sure why this hasn't being applied yet for 8.3 Because it doesn't fix the problem ... which is that the postmaster kills the archiver (and the stats collector too) at what is now the wrong point in the shutdown sequence. regar

Re: [PATCHES] [HACKERS] Archiver behavior at shutdown

2008-01-09 Thread Simon Riggs
On Sat, 2008-01-05 at 12:09 +, Simon Riggs wrote: > On Fri, 2008-01-04 at 17:28 +0900, Fujii Masao wrote: > > Simon Riggs wrote: > > > > > My original one line change described on bug 3843 seems like the best > > > solution for 8.3. > > > > > > > +1 > > Is this change in time for RC1? > > P

Re: [HACKERS] Archiver behavior at shutdown

2008-01-05 Thread Simon Riggs
On Fri, 2008-01-04 at 17:28 +0900, Fujii Masao wrote: > Simon Riggs wrote: > > > My original one line change described on bug 3843 seems like the best > > solution for 8.3. > > > > +1 > Is this change in time for RC1? Patch attached. -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com

Re: [HACKERS] Archiver behavior at shutdown

2008-01-04 Thread Fujii Masao
Simon Riggs wrote: > My original one line change described on bug 3843 seems like the best > solution for 8.3. > +1 Is this change in time for RC1? -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center TEL (03)5860-5115 FAX (03)5463-5490 ---

Re: [HACKERS] Archiver behavior at shutdown

2007-12-29 Thread Simon Riggs
On Fri, 2007-12-28 at 20:20 -0500, Greg Smith wrote: > On Sat, 29 Dec 2007, Simon Riggs wrote: > > > System Shutdown > > System shuts down, postmaster shuts down, archiver works furiously until > > the end trying to archive things away. Archiver gets caught half way > > through copy, so crashes, l

Re: [HACKERS] Archiver behavior at shutdown

2007-12-28 Thread Greg Smith
On Sat, 29 Dec 2007, Simon Riggs wrote: System Shutdown System shuts down, postmaster shuts down, archiver works furiously until the end trying to archive things away. Archiver gets caught half way through copy, so crashes, leaving archiver.pid. Subsequent startup sees archiver.pid, postmaster r

Re: [HACKERS] Archiver behavior at shutdown

2007-12-28 Thread Simon Riggs
On Thu, 2007-12-27 at 18:54 -0500, Tom Lane wrote: > Simon Riggs <[EMAIL PROTECTED]> writes: > > On Thu, 2007-12-27 at 17:29 -0500, Tom Lane wrote: > >> Alvaro Herrera <[EMAIL PROTECTED]> writes: > >>> then a subsequent postmaster start could initiate a second archiver > >>> process which would ca

Re: [HACKERS] Archiver behavior at shutdown

2007-12-27 Thread Tom Lane
Simon Riggs <[EMAIL PROTECTED]> writes: > On Thu, 2007-12-27 at 17:29 -0500, Tom Lane wrote: >> Alvaro Herrera <[EMAIL PROTECTED]> writes: >>> then a subsequent postmaster start could initiate a second archiver >>> process which would cause issues with whatever the first archiver is >>> doing. >>

Re: [HACKERS] Archiver behavior at shutdown

2007-12-27 Thread Simon Riggs
On Thu, 2007-12-27 at 17:29 -0500, Tom Lane wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > What does postmaster do then? Sleep until archiver is done, or exit > > immediately and hope that the archiver goes away as soon as it finishes? > > I think it can just exit immediately, particular

Re: [HACKERS] Archiver behavior at shutdown

2007-12-27 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > What does postmaster do then? Sleep until archiver is done, or exit > immediately and hope that the archiver goes away as soon as it finishes? I think it can just exit immediately, particularly if we invent the variant signal for "archive what you can

Re: [HACKERS] Archiver behavior at shutdown

2007-12-27 Thread Alvaro Herrera
Tom Lane wrote: > ISTM the postmaster should leave the archiver alone at the > PM_WAIT_BACKENDS -> PM_SHUTDOWN transition, and instead send it > a WAKEN signal (SIGUSR1) when it sees normal exit of the bgwriter. > That will afford an opportunity to archive anything that was pushed > out during the

Re: [HACKERS] Archiver behavior at shutdown

2007-12-27 Thread Tom Lane
Simon Riggs <[EMAIL PROTECTED]> writes: > ...based upon limitations of the existing system. We have been > SIGQUIT'ing the archiver, and there is a comment there to say how > important it is that we *do not* try to finish processing before we > quit. If you think that comment is wrong, thats OK by

Re: [HACKERS] Archiver behavior at shutdown

2007-12-27 Thread Simon Riggs
On Thu, 2007-12-27 at 15:29 -0500, Tom Lane wrote: > As of CVS HEAD, the behavior after the postmaster receives a shutdown > request and has seen its last regular-backend child die is: ...based upon limitations of the existing system. We have been SIGQUIT'ing the archiver, and there is a comment

[HACKERS] Archiver behavior at shutdown

2007-12-27 Thread Tom Lane
The problem complained of in bug #3843 was something I'd noticed a few days ago and meant to fix. ISTM the recent change to have the archiver outlive the postmaster was incompletely thought out, and we really need to take two steps back and reconsider, if we want to fix it so it works. As of CVS H