pg_archivecleanup -d (=verbose/DEBUG mode) mainly emits 2 types of messages:
pg_archivecleanup: keep WAL file "000000010000000000000002" and later
and:
pg_archivecleanup: removing file
"/var/data2/pg_stuff/dump/hotprime/replication_archive/00000001000000000000001B"
I found it a bit annoying to not see the full path in the 'keep WAL
file'-message (esp. when it is
repeated many screenfulls).
If only for consistency, this patch adds the path info to that message.
Erik Rijkers
--- contrib/pg_archivecleanup/pg_archivecleanup.c.orig 2010-08-22 00:05:06.000000000 +0200
+++ contrib/pg_archivecleanup/pg_archivecleanup.c 2010-08-21 23:56:47.000000000 +0200
@@ -308,8 +308,15 @@
SetWALFileNameForCleanup();
if (debug)
+ {
+#ifdef WIN32
+ snprintf(WALFilePath, MAXPGPATH, "%s\\%s", archiveLocation, exclusiveCleanupFileName);
+#else
+ snprintf(WALFilePath, MAXPGPATH, "%s/%s", archiveLocation, exclusiveCleanupFileName);
+#endif
fprintf(stderr, "%s: keep WAL file \"%s\" and later\n",
- progname, exclusiveCleanupFileName);
+ progname, WALFilePath);
+ }
/*
* Remove WAL files older than cut-off
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers