Hi, On 2014-12-19 22:56:40 +0200, Heikki Linnakangas wrote: > This add two new archive_modes, 'shared' and 'always', to indicate whether > the WAL archive is shared between the primary and standby, or not. In > shared mode, the standby tracks which files have been archived by the > primary. The standby refrains from recycling files that the primary has > not yet archived, and at failover, the standby archives all those files too > from the old timeline. In 'always' mode, the standby's WAL archive is > taken to be separate from the primary's, and the standby independently > archives all files it receives from the primary.
I don't really like this approach. Sharing a archive is rather dangerous in my experience - if your old master comes up again (and writes in the last wal file) or similar, you can get into really bad situations. What I was thinking about was instead trying to detect the point up to which files were safely archived by running restore command to check for the presence of archived files. Then archive anything that has valid content and isn't yet archived. That doesn't sound particularly complicated to me. Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers