Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
e57cd393
Commit
e57cd393
authored
Aug 23, 2010
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make pg_archivecleanup log messages more consistent.
Erik Rijkers
parent
005e427a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
contrib/pg_archivecleanup/pg_archivecleanup.c
contrib/pg_archivecleanup/pg_archivecleanup.c
+12
-12
No files found.
contrib/pg_archivecleanup/pg_archivecleanup.c
View file @
e57cd393
/*
/*
* $PostgreSQL: pgsql/contrib/pg_archivecleanup/pg_archivecleanup.c,v 1.
3 2010/07/06 19:18:55 momjian
Exp $
* $PostgreSQL: pgsql/contrib/pg_archivecleanup/pg_archivecleanup.c,v 1.
4 2010/08/23 02:56:24 tgl
Exp $
*
*
* pg_archivecleanup.c
* pg_archivecleanup.c
*
*
...
@@ -18,16 +18,16 @@
...
@@ -18,16 +18,16 @@
#include <fcntl.h>
#include <fcntl.h>
#include <signal.h>
#include <signal.h>
#ifdef WIN32
#ifndef WIN32
int
getopt
(
int
argc
,
char
*
const
argv
[],
const
char
*
optstring
);
#else
#include <sys/time.h>
#include <sys/time.h>
#include <unistd.h>
#include <unistd.h>
#ifdef HAVE_GETOPT_H
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#include <getopt.h>
#endif
#endif
#endif
/* ! WIN32 */
#else
/* WIN32 */
extern
int
getopt
(
int
argc
,
char
*
const
argv
[],
const
char
*
optstring
);
#endif
/* ! WIN32 */
extern
char
*
optarg
;
extern
char
*
optarg
;
extern
int
optind
;
extern
int
optind
;
...
@@ -117,12 +117,8 @@ CleanupPriorWALFiles(void)
...
@@ -117,12 +117,8 @@ CleanupPriorWALFiles(void)
strspn
(
xlde
->
d_name
,
"0123456789ABCDEF"
)
==
XLOG_DATA_FNAME_LEN
&&
strspn
(
xlde
->
d_name
,
"0123456789ABCDEF"
)
==
XLOG_DATA_FNAME_LEN
&&
strcmp
(
xlde
->
d_name
+
8
,
exclusiveCleanupFileName
+
8
)
<
0
)
strcmp
(
xlde
->
d_name
+
8
,
exclusiveCleanupFileName
+
8
)
<
0
)
{
{
#ifdef WIN32
snprintf
(
WALFilePath
,
MAXPGPATH
,
"%s/%s"
,
snprintf
(
WALFilePath
,
MAXPGPATH
,
"%s
\\
%s"
,
archiveLocation
,
xlde
->
d_name
);
archiveLocation
,
xlde
->
d_name
);
#else
snprintf
(
WALFilePath
,
MAXPGPATH
,
"%s/%s"
,
archiveLocation
,
xlde
->
d_name
);
#endif
if
(
debug
)
if
(
debug
)
fprintf
(
stderr
,
"%s: removing file
\"
%s
\"\n
"
,
fprintf
(
stderr
,
"%s: removing file
\"
%s
\"\n
"
,
progname
,
WALFilePath
);
progname
,
WALFilePath
);
...
@@ -308,8 +304,12 @@ main(int argc, char **argv)
...
@@ -308,8 +304,12 @@ main(int argc, char **argv)
SetWALFileNameForCleanup
();
SetWALFileNameForCleanup
();
if
(
debug
)
if
(
debug
)
{
snprintf
(
WALFilePath
,
MAXPGPATH
,
"%s/%s"
,
archiveLocation
,
exclusiveCleanupFileName
);
fprintf
(
stderr
,
"%s: keep WAL file
\"
%s
\"
and later
\n
"
,
fprintf
(
stderr
,
"%s: keep WAL file
\"
%s
\"
and later
\n
"
,
progname
,
exclusiveCleanupFileName
);
progname
,
WALFilePath
);
}
/*
/*
* Remove WAL files older than cut-off
* Remove WAL files older than cut-off
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment