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

Commit93b99d3

Browse files
committed
Register atexit hook only once in pg_upgrade.
start_postmaster() registered stop_postmaster_atexit as an atexit(3)callback each time through, although the obvious intention was to doso only once per program run. The extra registrations were harmless,so long as we didn't exceed ATEXIT_MAX, but still it's a bug.Artur Zakirov, with bikeshedding by Kyotaro Horiguchi and meDiscussion: <d279e817-02b5-caa6-215f-cfb05dce109a@postgrespro.ru>
1 parent6b8a89e commit93b99d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/bin/pg_upgrade/server.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,11 @@ start_postmaster(ClusterInfo *cluster, bool throw_error)
174174
{
175175
charcmd[MAXPGPATH*4+1000];
176176
PGconn*conn;
177-
boolexit_hook_registered= false;
178177
boolpg_ctl_return= false;
179178
charsocket_string[MAXPGPATH+200];
180179

180+
staticboolexit_hook_registered= false;
181+
181182
if (!exit_hook_registered)
182183
{
183184
atexit(stop_postmaster_atexit);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp