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

Commit2be82dc

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 parente922a13 commit2be82dc

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
@@ -1140,6 +1140,12 @@ PostmasterMain(int argc, char *argv[])
11401140
on_proc_exit(unlink_external_pid_file,0);
11411141
}
11421142

1143+
/*
1144+
* Remove old temporary files. At this point there can be no other
1145+
* Postgres processes running in this directory, so this should be safe.
1146+
*/
1147+
RemovePgTempFiles();
1148+
11431149
/*
11441150
* If enabled, start up syslogger collection subprocess
11451151
*/
@@ -1197,13 +1203,6 @@ PostmasterMain(int argc, char *argv[])
11971203
*/
11981204
}
11991205

1200-
1201-
/*
1202-
* Remove old temporary files. At this point there can be no other
1203-
* Postgres processes running in this directory, so this should be safe.
1204-
*/
1205-
RemovePgTempFiles();
1206-
12071206
#ifdefHAVE_PTHREAD_IS_THREADED_NP
12081207

12091208
/*
@@ -5869,7 +5868,7 @@ read_backend_variables(char *id, Port *port)
58695868
fp=AllocateFile(id,PG_BINARY_R);
58705869
if (!fp)
58715870
{
5872-
write_stderr("could notread from backend variables file \"%s\": %s\n",
5871+
write_stderr("could notopen backend variables file \"%s\": %s\n",
58735872
id,strerror(errno));
58745873
exit(1);
58755874
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp