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