|
37 | 37 | *
|
38 | 38 | *
|
39 | 39 | * IDENTIFICATION
|
40 |
| - * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.296 2002/11/1501:57:26 momjian Exp $ |
| 40 | + * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.297 2002/11/1502:44:55 momjian Exp $ |
41 | 41 | *
|
42 | 42 | * NOTES
|
43 | 43 | *
|
@@ -198,6 +198,8 @@ boolSilentMode = false; /* silent mode (-S) */
|
198 | 198 | intPreAuthDelay=0;
|
199 | 199 | intAuthenticationTimeout=60;
|
200 | 200 | intCheckPointTimeout=300;
|
| 201 | +intCheckPointWarning=30; |
| 202 | +time_tLastSignalledCheckpoint=0; |
201 | 203 |
|
202 | 204 | boollog_hostname;/* for ps display */
|
203 | 205 | boolLogSourcePort;
|
@@ -2329,6 +2331,22 @@ sigusr1_handler(SIGNAL_ARGS)
|
2329 | 2331 |
|
2330 | 2332 | if (CheckPostmasterSignal(PMSIGNAL_DO_CHECKPOINT))
|
2331 | 2333 | {
|
| 2334 | +if (CheckPointWarning!=0) |
| 2335 | +{ |
| 2336 | +/* |
| 2337 | + *This only times checkpoints forced by running out of |
| 2338 | + *segment files. Other checkpoints could reduce |
| 2339 | + *the frequency of forced checkpoints. |
| 2340 | + */ |
| 2341 | +time_tnow=time(NULL); |
| 2342 | + |
| 2343 | +if (now-LastSignalledCheckpoint<CheckPointWarning) |
| 2344 | +elog(LOG,"Checkpoint segments are being created too frequently (%d secs)\n |
| 2345 | +ConsiderincreasingCHECKPOINT_SEGMENTS", |
| 2346 | +now-LastSignalledCheckpoint); |
| 2347 | +LastSignalledCheckpoint=now; |
| 2348 | +} |
| 2349 | + |
2332 | 2350 | /*
|
2333 | 2351 | * Request to schedule a checkpoint
|
2334 | 2352 | *
|
|