Re: BUG #3843: archiver process is restarted after the smart shutdown

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: fujii(dot)masao(at)oss(dot)ntt(dot)co(dot)jp, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3843: archiver process is restarted after the smart shutdown
Date: 2007-12-27 20:20:01
Message-ID: 1198786801.4221.370.camel@ebony.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, 2007-12-27 at 10:10 -0500, Tom Lane wrote:
> Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> > If there are no objections, I will add an extra condition to the wait,
>
> That's not the correct fix. The problem is that the archiver is getting
> killed in the first place. What the postmaster should do instead is
> waken it after the shutdown process terminates.

Waking up the archiver in a different place is possible, and I'm happy
to do it, but my suggested change was looking at a different issue.

In 8.3 we added the code to wake up the archiver again even during
shutdown. So the archiver wakes back up again during a shutdown and does
its thing. So the bug report is not a bug, its just observing that the
behaviour has changed in 8.3

The problem I perceived was that the archiver was hanging around too
long after shutdown, which I noticed was related to the way the sleep
occurs in the archiver's wait loop. So wherever we wake up the archiver,
it will still hang around longer than might be convenient in some
circumstances. If we reduce that wait, then the OP might not even have
observed the archiver had restarted at all.

So I'd like to change the wait loop as described, though am happy to
consider other changes as well if that's your wish. Yes?

--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2007-12-27 20:42:26 Re: BUG #3841: core dump in uuid-ossp
Previous Message Alvaro Herrera 2007-12-27 19:40:44 Re: BUG #3841: core dump in uuid-ossp