Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite57cd39

Browse files
committed
Make pg_archivecleanup log messages more consistent.
Erik Rijkers
1 parent005e427 commite57cd39

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

‎contrib/pg_archivecleanup/pg_archivecleanup.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $PostgreSQL: pgsql/contrib/pg_archivecleanup/pg_archivecleanup.c,v 1.3 2010/07/06 19:18:55 momjian Exp $
2+
* $PostgreSQL: pgsql/contrib/pg_archivecleanup/pg_archivecleanup.c,v 1.4 2010/08/23 02:56:24 tgl Exp $
33
*
44
* pg_archivecleanup.c
55
*
@@ -18,16 +18,16 @@
1818
#include<fcntl.h>
1919
#include<signal.h>
2020

21-
#ifdefWIN32
22-
intgetopt(intargc,char*constargv[],constchar*optstring);
23-
#else
21+
#ifndefWIN32
2422
#include<sys/time.h>
2523
#include<unistd.h>
2624

2725
#ifdefHAVE_GETOPT_H
2826
#include<getopt.h>
2927
#endif
30-
#endif/* ! WIN32 */
28+
#else/* WIN32 */
29+
externintgetopt(intargc,char*constargv[],constchar*optstring);
30+
#endif/* ! WIN32 */
3131

3232
externchar*optarg;
3333
externintoptind;
@@ -117,12 +117,8 @@ CleanupPriorWALFiles(void)
117117
strspn(xlde->d_name,"0123456789ABCDEF")==XLOG_DATA_FNAME_LEN&&
118118
strcmp(xlde->d_name+8,exclusiveCleanupFileName+8)<0)
119119
{
120-
#ifdefWIN32
121-
snprintf(WALFilePath,MAXPGPATH,"%s\\%s",archiveLocation,xlde->d_name);
122-
#else
123-
snprintf(WALFilePath,MAXPGPATH,"%s/%s",archiveLocation,xlde->d_name);
124-
#endif
125-
120+
snprintf(WALFilePath,MAXPGPATH,"%s/%s",
121+
archiveLocation,xlde->d_name);
126122
if (debug)
127123
fprintf(stderr,"%s: removing file \"%s\"\n",
128124
progname,WALFilePath);
@@ -308,8 +304,12 @@ main(int argc, char **argv)
308304
SetWALFileNameForCleanup();
309305

310306
if (debug)
307+
{
308+
snprintf(WALFilePath,MAXPGPATH,"%s/%s",
309+
archiveLocation,exclusiveCleanupFileName);
311310
fprintf(stderr,"%s: keep WAL file \"%s\" and later\n",
312-
progname,exclusiveCleanupFileName);
311+
progname,WALFilePath);
312+
}
313313

314314
/*
315315
* Remove WAL files older than cut-off

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp