]> granicus.if.org Git - postgresql/commit
Make WAL-related utilities handle .partial WAL files properly.
authorFujii Masao <fujii@postgresql.org>
Fri, 3 Jul 2015 02:53:58 +0000 (11:53 +0900)
committerFujii Masao <fujii@postgresql.org>
Fri, 3 Jul 2015 02:53:58 +0000 (11:53 +0900)
commit8650d161ae4369ec64a6fc7b7cbd0e6e55c3a7aa
tree7eccc2b835a4d2cca2d3506058fd7abdd1d06610
parent5671aaca87c47128f6a1e0556ce9c7512096ad87
Make WAL-related utilities handle .partial WAL files properly.

Commit de76884 changed an archive recovery so that the last WAL
segment with old timeline was renamed with suffix .partial. It should
have updated WAL-related utilities so that they can handle such
.paritial WAL files, but we forgot that.

This patch changes pg_archivecleanup so that it can clean up even
archived WAL files with .partial suffix. Also it allows us to specify
.partial WAL file name as the command-line argument "oldestkeptwalfile".

This patch also changes pg_resetxlog so that it can remove .partial
WAL files in pg_xlog directory.

pg_xlogdump cannot handle .partial WAL files. Per discussion,
we decided only to document that limitation instead of adding the fix.
Because a user can easily work around the limitation (i.e., just remove
.partial suffix from the file name) and the fix seems complicated for
very narrow use case.

Back-patch to 9.5 where the problem existed.

Review by Michael Paquier.
Discussion: http://www.postgresql.org/message-id/CAHGQGwGxMKnVHGgTfiig2Bt_2djec0in3-DLJmtg7+nEiidFdQ@mail.gmail.com
doc/src/sgml/ref/pg_xlogdump.sgml
doc/src/sgml/ref/pgarchivecleanup.sgml
src/bin/pg_archivecleanup/pg_archivecleanup.c
src/bin/pg_resetxlog/pg_resetxlog.c