Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7351e18

Browse files
committed
Add more chattiness in server shutdown.
Early returns from the buildfarm show that there's a bit of a gap in thelogging I added in3971f64: the portion of CreateCheckPoint()after CheckPointGuts() can take a fair amount of time. Add a few morelog messages in that section of code. This too shall be reverted later.
1 parent3971f64 commit7351e18

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8436,6 +8436,9 @@ CreateCheckPoint(int flags)
84368436

84378437
XLogFlush(recptr);
84388438

8439+
elog(IsPostmasterEnvironment ?LOG :NOTICE,
8440+
"checkpoint WAL record flushed at %s",current_time_as_str());
8441+
84398442
/*
84408443
* We mustn't write any new WAL after a shutdown checkpoint, or it will be
84418444
* overwritten at next startup. No-one should even try, this just allows
@@ -8491,6 +8494,9 @@ CreateCheckPoint(int flags)
84918494
UpdateControlFile();
84928495
LWLockRelease(ControlFileLock);
84938496

8497+
elog(IsPostmasterEnvironment ?LOG :NOTICE,
8498+
"pg_control updated at %s",current_time_as_str());
8499+
84948500
/* Update shared-memory copy of checkpoint XID/epoch */
84958501
SpinLockAcquire(&XLogCtl->info_lck);
84968502
XLogCtl->ckptXidEpoch=checkPoint.nextXidEpoch;
@@ -8508,6 +8514,9 @@ CreateCheckPoint(int flags)
85088514
*/
85098515
smgrpostckpt();
85108516

8517+
elog(IsPostmasterEnvironment ?LOG :NOTICE,
8518+
"smgrpostckpt() done at %s",current_time_as_str());
8519+
85118520
/*
85128521
* Delete old log files (those no longer needed even for previous
85138522
* checkpoint or the standbys in XLOG streaming).
@@ -8523,6 +8532,9 @@ CreateCheckPoint(int flags)
85238532
KeepLogSeg(recptr,&_logSegNo);
85248533
_logSegNo--;
85258534
RemoveOldXlogFiles(_logSegNo,PriorRedoPtr,recptr);
8535+
8536+
elog(IsPostmasterEnvironment ?LOG :NOTICE,
8537+
"RemoveOldXlogFiles() done at %s",current_time_as_str());
85268538
}
85278539

85288540
/*
@@ -8540,7 +8552,11 @@ CreateCheckPoint(int flags)
85408552
* StartupSUBTRANS hasn't been called yet.
85418553
*/
85428554
if (!RecoveryInProgress())
8555+
{
85438556
TruncateSUBTRANS(GetOldestXmin(NULL, false));
8557+
elog(IsPostmasterEnvironment ?LOG :NOTICE,
8558+
"TruncateSUBTRANS() done at %s",current_time_as_str());
8559+
}
85448560

85458561
/* Real work is done, but log and update stats before releasing lock. */
85468562
LogCheckpointEnd(false);

‎src/backend/storage/smgr/md.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,6 +1314,11 @@ mdpostckpt(void)
13141314
if (entry->cycle_ctr==mdckpt_cycle_ctr)
13151315
break;
13161316

1317+
if ((list_length(pendingUnlinks) %1024)==0)
1318+
elog(IsPostmasterEnvironment ?LOG :NOTICE,
1319+
"in mdpostckpt, %d unlinks remain to do at %s",
1320+
list_length(pendingUnlinks),current_time_as_str());
1321+
13171322
/* Unlink the file */
13181323
path=relpathperm(entry->rnode,MAIN_FORKNUM);
13191324
if (unlink(path)<0)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp