From: Simon Riggs <simon@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jeff Frost <jeff@frostconsultingllc.com>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: [ADMIN] does wal archiving block the current client
Date: Tue, 23 May 2006 15:49:15 +0100
Message-ID: <1148395755.2646.825.camel@localhost.localdomain> (raw)
In-Reply-To: <1148056053.2646.672.camel@localhost.localdomain>
References: <Pine.LNX.4.64.0605150914360.9581@discord.dyndns.org>
<Pine.LNX.4.64.0605151554000.9581@discord.dyndns.org>
<727.1148054597@sss.pgh.pa.us>
<1148056053.2646.672.camel@localhost.localdomain>
On Fri, 2006-05-19 at 17:27 +0100, Simon Riggs wrote:
> On Fri, 2006-05-19 at 12:03 -0400, Tom Lane wrote:
> > Simon Riggs <simon@2ndquadrant.com> writes:
> > > OK, I'm on it.
> >
> > What solution have you got in mind? I was thinking about an fcntl lock
> > to ensure only one archiver is active in a given data directory. That
> > would fix the problem without affecting anything outside the archiver.
> > Not sure what's the most portable way to do it though.
>
> I was trying to think of a better way than using an archiver.pid file in
> pg_xlog/archive_status...
Yesterday I posted to -patches with a new archiver.pid interlock
mechanism. This will prevent server startup when the archiver is first
activated, but once running will clean up and restart again.
This doesn't quite get to the nub of the problem: archiver is designed
to keep archiving files, even in the event that the postmaster explodes.
It will keep archiving until they're all gone.
My recent patch will prevent server startup, so if you do a fast restart
to bounce the server and change parameters you'll have to keep the
server down while the archiver completes (or you kill it).
The archiver's Spartan diligence is great if postmaster does fail, but
archiver can't tell the difference between a normal shutdown and a
postmaster crash. If the postmaster sent a SIGUSR2 on normal shutdown,
we would be able to interrupt the outer loop and shutdown much faster. A
starting postmaster might then reasonably wait a little while for the
old archiver to quit before starting the new one.
What do you think?
--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: simon@2ndquadrant.com, tgl@sss.pgh.pa.us, jeff@frostconsultingllc.com, pgsql-hackers@postgreSQL.org
Subject: Re: [ADMIN] does wal archiving block the current client
In-Reply-To: <1148395755.2646.825.camel@localhost.localdomain>
References: <Pine.LNX.4.64.0605150914360.9581@discord.dyndns.org> <Pine.LNX.4.64.0605151554000.9581@discord.dyndns.org> <727.1148054597@sss.pgh.pa.us> <1148056053.2646.672.camel@localhost.localdomain> <1148395755.2646.825.camel@localhost.localdomain>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox