Skip site navigation (1) Skip section navigation (2)

Re: Revised patch for fixing archiver shutdown behavior

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: pgsql-patches(at)postgreSQL(dot)org, Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: Revised patch for fixing archiver shutdown behavior
Date: 2008-01-10 15:49:28
Message-ID: 6075.1199980168@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Tom Lane wrote:
>> Maybe we should go back to the plan of having the postmaster
>> wait for the archiver to exit.

> Yeah, that seems the safest to me -- the problem is that it complicates
> the shutdown sequence a fair bit, because postmaster must act
> differently depending on whether archiving is enabled or not: wait for
> bgwriter exit if disabled, or for archiver exit otherwise.

Given the recent changes to make the postmaster act as a state machine,
I don't think this is really a big deal --- it's just one more state.
The bigger part is that the archiver can't wait for postmaster exit.
We'll need a proper shutdown signal for the archiver, but since it's
not using SIGUSR2 that can be commandeered easily.  So it'd be like

	SIGUSR1 -> do an archive cycle
	SIGUSR2 -> do an archive cycle and exit
	no postmaster -> just exit

The rationale for the last is that it's a crash situation, and
furthermore there's a risk of someone starting a new postmaster
and a conflicting archiver.  So we should put back the behavior
my last patch removed of aborting archiving immediately on
postmaster death.

I'll respin my patch this way...

			regards, tom lane

In response to

Responses

pgsql-patches by date

Next:From: Simon RiggsDate: 2008-01-10 15:53:04
Subject: Re: Revised patch for fixing archiver shutdown behavior
Previous:From: Hiroshi SaitoDate: 2008-01-10 15:29:53
Subject: Re: reference problem of manifest.(win32.mak of libpq.dll)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group