Re: Revised patch for fixing archiver shutdown behavior

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 00:30:21
Message-ID: 20080110003020.GC22548@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom Lane wrote:
> The attached patch fixes archiver shutdown in what seems to me to be
> a sane way. With the patch, we send SIGQUIT to the archiver only for
> panic-stop situations (backend crash or immediate-mode shutdown).
> This is important because the postmaster is coded to send SIGQUIT
> to the entire process group, meaning we'd also ungracefully terminate
> any currently-running archive command, which does not seem like a good
> idea for normal exit. Instead, the shutdown protocol is that *after*
> the bgwriter has quit, we send SIGUSR1 (ie, the normal archiver wakeup
> signal) to the archiver. This ensures that it will do a normal
> archiving cycle after the last possible creation of WAL entries.

Hmm, so the postmaster is gone during the last archiving cycle? What
about syslogger? Is the archiver able to log stuff in the last cycle?

The comment in line 2180 seems a bit bogus ...?

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-01-10 00:39:14 Re: Revised patch for fixing archiver shutdown behavior
Previous Message Tom Lane 2008-01-09 23:28:00 Revised patch for fixing archiver shutdown behavior