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

Commit741b1b2

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 parent19954a4 commit741b1b2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,12 @@ PostmasterMain(int argc, char *argv[])
10641064
progname,external_pid_file,strerror(errno));
10651065
}
10661066

1067+
/*
1068+
* Remove old temporary files. At this point there can be no other
1069+
* Postgres processes running in this directory, so this should be safe.
1070+
*/
1071+
RemovePgTempFiles();
1072+
10671073
/*
10681074
* If enabled, start up syslogger collection subprocess
10691075
*/
@@ -1103,12 +1109,6 @@ PostmasterMain(int argc, char *argv[])
11031109
}
11041110
load_ident();
11051111

1106-
/*
1107-
* Remove old temporary files. At this point there can be no other
1108-
* Postgres processes running in this directory, so this should be safe.
1109-
*/
1110-
RemovePgTempFiles();
1111-
11121112
#ifdefHAVE_PTHREAD_IS_THREADED_NP
11131113

11141114
/*
@@ -4937,7 +4937,7 @@ read_backend_variables(char *id, Port *port)
49374937
fp=AllocateFile(id,PG_BINARY_R);
49384938
if (!fp)
49394939
{
4940-
write_stderr("could notread from backend variables file \"%s\": %s\n",
4940+
write_stderr("could notopen backend variables file \"%s\": %s\n",
49414941
id,strerror(errno));
49424942
exit(1);
49434943
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp