From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_archivecleanup should remove WAL files also in pg_xlog? |
Date: | 2010-12-13 09:02:50 |
Message-ID: | AANLkTikFEmq3KVtwUXjWKhjObo6NrN+oTLc_LDVmssbG@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Dec 13, 2010 at 5:01 PM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> If the only consequence is that you get some extra WAL files in the archive,
> until pg_archivecleanup runs again, I think we can just live with it.
We might get some extra WAL files also in pg_xlog. Because the WAL
files which don't have .ready/.done file survive two checkpoints after
failover. IOW, though first checkpoint right after failover should remove
those WAL files, they cannot be removed since they don't have .done
file. Then the first checkpoint creates .ready files for them, the archiver
performs bulk-archiving (this would be harm in performance if there
are many such WAL files), and the subsequent checkpoint removes
them.
> But
> don't you have bigger problems when standby tries to archive a file that
> already exists in the archive, because master already archived it? We advise
> to write archive_command so that it fails if the file exists already.
Yep, that's recommended in the document, but I don't want to use that.
Because that might make new master fail to archive WAL file because of
existence of half-baked file in the archive, after failover. This can happen
if the master crashes while its archiver is copying WAL file.
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Dmitriy Igrishin | 2010-12-13 09:47:38 | Re: hstores in pl/python |
Previous Message | Greg Smith | 2010-12-13 08:19:46 | Re: Instrument checkpoint sync calls |