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

Commit2c7615f

Browse files
committed
process startup: Initialize PgStartTime earlier in single user mode.
An upcoming patch splits single user mode handling out of PostgresMain(). Thestartup time only needs to be determined in single user mode. Currently theinitialization happens late, which makes the split a bit harder. As postmasterdetermines the time earlier it makes sense to move the time for single usermode to a roughly similar point in time.Reviewd-By: Kyotaro Horiguchi <horikyota.ntt@gmail.com>Author: Andres Freund <andres@anarazel.de>Discussion:https://postgr.es/m/20210802164124.ufo5buo4apl6yuvs@alap3.anarazel.de
1 parente3ec3c0 commit2c7615f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎src/backend/tcop/postgres.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4052,6 +4052,12 @@ PostgresMain(int argc, char *argv[],
40524052
InitializeMaxBackends();
40534053

40544054
CreateSharedMemoryAndSemaphores();
4055+
4056+
/*
4057+
* Remember stand-alone backend startup time, roughly at the same
4058+
* point during startup that postmaster does so.
4059+
*/
4060+
PgStartTime=GetCurrentTimestamp();
40554061
}
40564062

40574063
/*
@@ -4161,12 +4167,6 @@ PostgresMain(int argc, char *argv[],
41614167
initStringInfo(&row_description_buf);
41624168
MemoryContextSwitchTo(TopMemoryContext);
41634169

4164-
/*
4165-
* Remember stand-alone backend startup time
4166-
*/
4167-
if (!IsUnderPostmaster)
4168-
PgStartTime=GetCurrentTimestamp();
4169-
41704170
/*
41714171
* POSTGRES main processing loop begins here
41724172
*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp