Hi, WAL-related tools, i.e., pg_archivecleanup, pg_resetxlog and pg_xlogdump don't seem to properly handle .paritial WAL file. I think that we should fix at least pg_archivecleanup, otherwise, in the system using pg_archivecleanup to clean up old archived files, the archived .paritial WAL file will never be removed. Thought?
To make pg_archivecleanup detect .paritial WAL file, I'd like to use IsPartialXLogFileName() macro that commit 179cdd0 added. Fortunately Michael proposed the patch which makes the macros in xlog_internal.h usable in WAL-related tools, and it's better to apply the fix based on his patch. So my plan is to apply his patch first and then apply the fix to pg_archivecleanup. http://www.postgresql.org/message-id/CAB7nPqSiKU+8HjVe_J05btonC5E7kvmRaLpGS6EaEQe=dy3...@mail.gmail.com Regarding pg_resetxlog and pg_xlogdump, do we need to change also them so that they can handle .paritial file properly? pg_resetxlog cannot clean up .partial file even if it should be removed. But the remaining .paritial file is harmless and will be recycled later by checkpoint, so extra treatment of .paritial file in pg_resetxlog may not be necessary. IOW, maybe we can document that's the limitation of pg_resetxlog. Also regarding pg_xlogdump, we can just document, for example, "please get rid of .paritial suffix from the WAL file name if you want to dump it by pg_xlogdump". Thought? Regards, -- Fujii Masao -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers