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.c53
1 files changed, 26 insertions, 27 deletions
diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c
index 2f52053a2c3..61019d7a5e3 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.17 2005/07/04 04:51:47 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.18 2005/10/15 02:49:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -49,11 +49,11 @@
* Timer definitions.
* ----------
*/
-#define PGARCH_AUTOWAKE_INTERVAL 60 /* How often to force a poll of
- * the archive status directory;
- * in seconds. */
-#define PGARCH_RESTART_INTERVAL 10 /* How often to attempt to restart
- * a failed archiver; in seconds. */
+#define PGARCH_AUTOWAKE_INTERVAL 60 /* How often to force a poll of the
+ * archive status directory; in
+ * seconds. */
+#define PGARCH_RESTART_INTERVAL 10 /* How often to attempt to restart a
+ * failed archiver; in seconds. */
/* ----------
* Archiver control info.
@@ -131,10 +131,9 @@ pgarch_start(void)
/*
* Do nothing if too soon since last archiver start. This is a safety
- * valve to protect against continuous respawn attempts if the
- * archiver is dying immediately at launch. Note that since we will be
- * re-called from the postmaster main loop, we will get another chance
- * later.
+ * valve to protect against continuous respawn attempts if the archiver is
+ * dying immediately at launch. Note that since we will be re-called from
+ * the postmaster main loop, we will get another chance later.
*/
curtime = time(NULL);
if ((unsigned int) (curtime - last_pgarch_start_time) <
@@ -292,9 +291,9 @@ pgarch_MainLoop(void)
/*
* We run the copy loop immediately upon entry, in case there are
- * unarchived files left over from a previous database run (or maybe
- * the archiver died unexpectedly). After that we wait for a signal
- * or timeout before doing more.
+ * unarchived files left over from a previous database run (or maybe the
+ * archiver died unexpectedly). After that we wait for a signal or
+ * timeout before doing more.
*/
wakened = true;
@@ -319,11 +318,11 @@ pgarch_MainLoop(void)
}
/*
- * There shouldn't be anything for the archiver to do except to
- * wait for a signal, ... however, the archiver exists to
- * protect our data, so she wakes up occasionally to allow
- * herself to be proactive. In particular this avoids getting
- * stuck if a signal arrives just before we sleep.
+ * There shouldn't be anything for the archiver to do except to wait
+ * for a signal, ... however, the archiver exists to protect our data,
+ * so she wakes up occasionally to allow herself to be proactive. In
+ * particular this avoids getting stuck if a signal arrives just
+ * before we sleep.
*/
if (!wakened)
{
@@ -349,9 +348,9 @@ pgarch_ArchiverCopyLoop(void)
/*
* 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 some backend will add files onto the list of those that
- * need archiving while we are still copying earlier archives
+ * them...mostly we expect this to be a single file, though it is possible
+ * some backend will add files onto the list of those that need archiving
+ * while we are still copying earlier archives
*/
while (pgarch_readyXlog(xlog))
{
@@ -488,10 +487,10 @@ static bool
pgarch_readyXlog(char *xlog)
{
/*
- * open xlog status directory and read through list of xlogs that have
- * the .ready suffix, looking for earliest file. It is possible to
- * optimise this code, though only a single file is expected on the
- * vast majority of calls, so....
+ * open xlog status directory and read through list of xlogs that have the
+ * .ready suffix, looking for earliest file. It is possible to optimise
+ * this code, though only a single file is expected on the vast majority
+ * of calls, so....
*/
char XLogArchiveStatusDir[MAXPGPATH];
char newxlog[MAX_XFN_CHARS + 6 + 1];
@@ -504,8 +503,8 @@ pgarch_readyXlog(char *xlog)
if (rldir == NULL)
ereport(ERROR,
(errcode_for_file_access(),
- errmsg("could not open archive status directory \"%s\": %m",
- XLogArchiveStatusDir)));
+ errmsg("could not open archive status directory \"%s\": %m",
+ XLogArchiveStatusDir)));
while ((rlde = ReadDir(rldir, XLogArchiveStatusDir)) != NULL)
{