Re: postgresql.conf archive_command example - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: postgresql.conf archive_command example
Date
Msg-id CA+U5nMKMrvHzd5tsgeHs4OAi5ntYna0uhOxK6sJ0gwP+B8-eqg@mail.gmail.com
Whole thread Raw
In response to Re: postgresql.conf archive_command example  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: postgresql.conf archive_command example
List pgsql-hackers
On Thu, Sep 8, 2011 at 7:05 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
> On Wed, Sep 7, 2011 at 11:53 PM, Robert Treat <rob@xzilla.net> wrote:
>> On Tue, Sep 6, 2011 at 10:11 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
>>> I agree that basically archive_command should not overwrite an existing file.
>>> But if the size of existing file is less than 16MB, it should do that.
>>> Otherwise,
>>> that WAL file would be lost forever.
>>
>> I think best practice in this case is that if you ever find an
>> existing file with the same name already in place, you should error
>> and investigate. We don't ship around partially completed WAL files,
>> and finding an existing one probably means something went wrong. (Of
>> course, we use rsync instead of copy/move, so we have some better
>> guarantees about this).
>
> That's an option. But I don't think that finding an existing file is so serious
> problem.

The recommendation should be that the archived files are never
overwritten because that prevents a huge range of data loss bugs and
kills them stone dead.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Large C files
Next
From: daveg
Date:
Subject: Re: FATAL: lock AccessShareLock on object 0/1260/0 is already held