Re: Clean shutdown and warm standby

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clean shutdown and warm standby
Date: 2009-05-28 14:21:42
Message-ID: 4A1E9DF6.6090009@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs wrote:
> On Thu, 2009-05-28 at 16:52 +0300, Heikki Linnakangas wrote:
>
>>> If the archiver is working, but has fallen behind at the point of
>>> shutdown, does the archiver operate for long enough to ensure we are
>>> archived up to the point of the log switch prior to checkpoint?
>> Yes, it archives all pending WAL segments before exiting.
>
> I don't think it does, please look again.

Still looks ok to me. pgarch_ArchiverCopyLoop() loops until all ready
WAL segments have been archived (assuming no errors).

>> Ok, we're good then I guess.
>
> No, because as I said, if archive_command has been returning non-zero
> then the archive will be incomplete.

Yes. You think that's wrong? How would you like it to behave, then? I
don't think you want the shutdown to wait indefinitely until all files
have been archived if there's an error.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zdenek Kotala 2009-05-28 14:34:38 Re: Compiler warning cleanup - unitilized const variables, pointer type mismatch
Previous Message Andrew Dunstan 2009-05-28 14:20:08 Re: PostgreSQL Developer meeting minutes up