aboutsummaryrefslogtreecommitdiff
path: root/src/backend/postmaster/pgarch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/postmaster/pgarch.c')
-rw-r--r--src/backend/postmaster/pgarch.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c
index 13b146ce537..1b0ad2786c4 100644
--- a/src/backend/postmaster/pgarch.c
+++ b/src/backend/postmaster/pgarch.c
@@ -19,7 +19,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.30 2007/08/02 23:39:44 adunstan Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.31 2007/09/26 22:36:30 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -314,8 +314,6 @@ pgarch_MainLoop(void)
{
got_SIGHUP = false;
ProcessConfigFile(PGC_SIGHUP);
- if (!XLogArchivingActive())
- break; /* user wants us to shut down */
}
/* Do what we're here for */
@@ -359,6 +357,14 @@ pgarch_ArchiverCopyLoop(void)
{
char xlog[MAX_XFN_CHARS + 1];
+ if (!XLogArchiveCommandSet())
+ {
+ ereport(WARNING,
+ (errmsg("archive_mode enabled, yet archive_command is not set")));
+ /* can't do anything if no command ... */
+ return;
+ }
+
/*
* loop through all xlogs with archive_status of .ready and archive
* them...mostly we expect this to be a single file, though it is possible