Commit 810f2cfa authored by Tom Lane's avatar Tom Lane

Suppress compile warning, avoid possible problems with signed vs. unsigned

comparisons in recently-added CheckPointWarning code.
parent 38e6eb19
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.297 2002/11/15 02:44:55 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.298 2002/11/18 00:40:46 tgl Exp $
* *
* NOTES * NOTES
* *
...@@ -2340,10 +2340,15 @@ sigusr1_handler(SIGNAL_ARGS) ...@@ -2340,10 +2340,15 @@ sigusr1_handler(SIGNAL_ARGS)
*/ */
time_t now = time(NULL); time_t now = time(NULL);
if (now - LastSignalledCheckpoint < CheckPointWarning) if (LastSignalledCheckpoint != 0)
elog(LOG, "Checkpoint segments are being created too frequently (%d secs)\n {
Consider increasing CHECKPOINT_SEGMENTS", int elapsed_secs = now - LastSignalledCheckpoint;
now - LastSignalledCheckpoint);
if (elapsed_secs < CheckPointWarning)
elog(LOG, "Checkpoint segments are being created too frequently (%d secs)"
"\n\tConsider increasing CHECKPOINT_SEGMENTS",
elapsed_secs);
}
LastSignalledCheckpoint = now; LastSignalledCheckpoint = now;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment