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

Commitb94ce6e

Browse files
committed
Move postmaster's RemovePgTempFiles call to a less randomly chosen place.
There is no reason to do this as early as possible in postmaster startup,and good reason not to do it until we have completely created thepostmaster's lock file, namely that it might contribute to pg_ctl thinkingthat postmaster startup has timed out. (This would require a ratherunusual amount of time to be spent scanning temp file directories, but wehave at least one field report of it happening reproducibly.)Back-patch to 9.1. Before that, pg_ctl didn't wait for additional info tobe added to the lock file, so it wasn't a problem.Note that this is not a complete fix to the slow-start issue in 9.1,because we still had identify_system_timezone being run during postmasterstart in 9.1. But that's at least a reasonably well-defined delay, withan easy workaround if needed, whereas the temp-files scan is not sopredictable and cannot be avoided.
1 parentefae465 commitb94ce6e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -826,12 +826,6 @@ PostmasterMain(int argc, char *argv[])
826826
*/
827827
process_shared_preload_libraries();
828828

829-
/*
830-
* Remove old temporary files.At this point there can be no other
831-
* Postgres processes running in this directory, so this should be safe.
832-
*/
833-
RemovePgTempFiles();
834-
835829
/*
836830
* Establish input sockets.
837831
*/
@@ -1099,6 +1093,12 @@ PostmasterMain(int argc, char *argv[])
10991093
}
11001094
load_ident();
11011095

1096+
/*
1097+
* Remove old temporary files.At this point there can be no other
1098+
* Postgres processes running in this directory, so this should be safe.
1099+
*/
1100+
RemovePgTempFiles();
1101+
11021102
/*
11031103
* Remember postmaster startup time
11041104
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp