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

Commitcc7a3a4

Browse files
committed
Make logging_collector=on work with non-windows EXEC_BACKEND again.
Commitb94ce6e reordered postmaster's startup sequence so that thetempfile directory is only cleaned up after all the necessary statefor pg_ctl is collected. Unfortunately the chosen location is afterthe syslogger has been started; which normally is fine, except for!WIN32 EXEC_BACKEND builds, which pass information to children viafiles in the temp directory.Move the call to RemovePgTempFiles() to just before the syslogger hasstarted. That's the first child we fork.Luckily EXEC_BACKEND is pretty much only used by endusers on windows,which has a separate method to pass information to children. Thatmeans the real world impact of this bug is very small.Discussion: 20150113182344.GF12272@alap3.anarazel.deBackpatch to 9.1, just as the previous commit was.
1 parent71942a8 commitcc7a3a4

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,6 +1173,12 @@ PostmasterMain(int argc, char *argv[])
11731173
on_proc_exit(unlink_external_pid_file,0);
11741174
}
11751175

1176+
/*
1177+
* Remove old temporary files. At this point there can be no other
1178+
* Postgres processes running in this directory, so this should be safe.
1179+
*/
1180+
RemovePgTempFiles();
1181+
11761182
/*
11771183
* If enabled, start up syslogger collection subprocess
11781184
*/
@@ -1230,13 +1236,6 @@ PostmasterMain(int argc, char *argv[])
12301236
*/
12311237
}
12321238

1233-
1234-
/*
1235-
* Remove old temporary files. At this point there can be no other
1236-
* Postgres processes running in this directory, so this should be safe.
1237-
*/
1238-
RemovePgTempFiles();
1239-
12401239
#ifdefHAVE_PTHREAD_IS_THREADED_NP
12411240

12421241
/*
@@ -6067,7 +6066,7 @@ read_backend_variables(char *id, Port *port)
60676066
fp=AllocateFile(id,PG_BINARY_R);
60686067
if (!fp)
60696068
{
6070-
write_stderr("could notread from backend variables file \"%s\": %s\n",
6069+
write_stderr("could notopen backend variables file \"%s\": %s\n",
60716070
id,strerror(errno));
60726071
exit(1);
60736072
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp