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

From Aidan Van Dyk
Subject Re: postgresql.conf archive_command example
Date
Msg-id CAC_2qU-hSvh34kKvD3rF+=7uQaiSWhhcbRib=-XeDjbB1PDR7A@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
Re: postgresql.conf archive_command example
List pgsql-hackers
On Thu, Sep 8, 2011 at 2:05 AM, Fujii Masao <masao.fujii@gmail.com> wrote:

> That's an option. But I don't think that finding an existing file is so serious
> problem. The most common cases which cause a partially-filled archived
> file are;
>
> 1. The server crashes while WAL file is being archived, and then the server
>    restarts. In this case, the restarted server would find partially-filled
>    archived file.
>
> 2. In replication environment, the master crashes while WAL file is being
>    archived, and then a failover happens. In this case, new master would
>    find partially-filled archived file.
>
> In these cases, I don't think it's so unsafe to overwrite an existing file.

Personally, I think both of these show examples of why PG should be
looking hard at either providing a simple robust local directory based
archive_command, or very seriously pointing users at properly written
tools like omniptr, or ptrtools, walmgr, etc...

Neither of those cases should ever happen.  If you're copying a file
into the archive, and making it appear non-atomically in your archive,
your doing something wrong.

Period.

No excuses.

a.
--
Aidan Van Dyk                                             Create like a god,
aidan@highrise.ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: pg_last_xact_insert_timestamp
Next
From: Ants Aasma
Date:
Subject: concurrent snapshots