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

Commit045c7d3

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 parent4ebb349 commit045c7d3

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
@@ -1143,6 +1143,12 @@ PostmasterMain(int argc, char *argv[])
11431143
on_proc_exit(unlink_external_pid_file,0);
11441144
}
11451145

1146+
/*
1147+
* Remove old temporary files. At this point there can be no other
1148+
* Postgres processes running in this directory, so this should be safe.
1149+
*/
1150+
RemovePgTempFiles();
1151+
11461152
/*
11471153
* If enabled, start up syslogger collection subprocess
11481154
*/
@@ -1200,13 +1206,6 @@ PostmasterMain(int argc, char *argv[])
12001206
*/
12011207
}
12021208

1203-
1204-
/*
1205-
* Remove old temporary files. At this point there can be no other
1206-
* Postgres processes running in this directory, so this should be safe.
1207-
*/
1208-
RemovePgTempFiles();
1209-
12101209
#ifdefHAVE_PTHREAD_IS_THREADED_NP
12111210

12121211
/*
@@ -5859,7 +5858,7 @@ read_backend_variables(char *id, Port *port)
58595858
fp=AllocateFile(id,PG_BINARY_R);
58605859
if (!fp)
58615860
{
5862-
write_stderr("could notread from backend variables file \"%s\": %s\n",
5861+
write_stderr("could notopen backend variables file \"%s\": %s\n",
58635862
id,strerror(errno));
58645863
exit(1);
58655864
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp