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 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2008-01-10 15:53:04 | Re: Revised patch for fixing archiver shutdown behavior |
Previous Message | Hiroshi Saito | 2008-01-10 15:29:53 | Re: reference problem of manifest.(win32.mak of libpq.dll) |