diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-02-09 11:21:46 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-02-09 11:21:46 -0500 |
commit | 7351e18286ec83461b386e23328d65fd4a538bba (patch) | |
tree | b856f7762b00d06b1ff76cd0588bf7bf9e0b9c49 /src/backend/access/transam/xlog.c | |
parent | 3971f64843b02e4a55d854156bd53e46a0588e45 (diff) | |
download | postgresql-7351e18286ec83461b386e23328d65fd4a538bba.tar.gz postgresql-7351e18286ec83461b386e23328d65fd4a538bba.zip |
Add more chattiness in server shutdown.
Early returns from the buildfarm show that there's a bit of a gap in the
logging I added in 3971f64843b02e4a: the portion of CreateCheckPoint()
after CheckPointGuts() can take a fair amount of time. Add a few more
log messages in that section of code. This too shall be reverted later.
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 6ea92b41022..d173609bc5d 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -8436,6 +8436,9 @@ CreateCheckPoint(int flags) XLogFlush(recptr); + elog(IsPostmasterEnvironment ? LOG : NOTICE, + "checkpoint WAL record flushed at %s", current_time_as_str()); + /* * We mustn't write any new WAL after a shutdown checkpoint, or it will be * overwritten at next startup. No-one should even try, this just allows @@ -8491,6 +8494,9 @@ CreateCheckPoint(int flags) UpdateControlFile(); LWLockRelease(ControlFileLock); + elog(IsPostmasterEnvironment ? LOG : NOTICE, + "pg_control updated at %s", current_time_as_str()); + /* Update shared-memory copy of checkpoint XID/epoch */ SpinLockAcquire(&XLogCtl->info_lck); XLogCtl->ckptXidEpoch = checkPoint.nextXidEpoch; @@ -8508,6 +8514,9 @@ CreateCheckPoint(int flags) */ smgrpostckpt(); + elog(IsPostmasterEnvironment ? LOG : NOTICE, + "smgrpostckpt() done at %s", current_time_as_str()); + /* * Delete old log files (those no longer needed even for previous * checkpoint or the standbys in XLOG streaming). @@ -8523,6 +8532,9 @@ CreateCheckPoint(int flags) KeepLogSeg(recptr, &_logSegNo); _logSegNo--; RemoveOldXlogFiles(_logSegNo, PriorRedoPtr, recptr); + + elog(IsPostmasterEnvironment ? LOG : NOTICE, + "RemoveOldXlogFiles() done at %s", current_time_as_str()); } /* @@ -8540,7 +8552,11 @@ CreateCheckPoint(int flags) * StartupSUBTRANS hasn't been called yet. */ if (!RecoveryInProgress()) + { TruncateSUBTRANS(GetOldestXmin(NULL, false)); + elog(IsPostmasterEnvironment ? LOG : NOTICE, + "TruncateSUBTRANS() done at %s", current_time_as_str()); + } /* Real work is done, but log and update stats before releasing lock. */ LogCheckpointEnd(false); |