pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Artur Zakirov <a.zakirov@postgrespro.ru>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: pg_upgrade: exit_hook_registered variable
Date: Thu, 28 Jul 2016 11:23:42 +0300
Message-ID: <d279e817-02b5-caa6-215f-cfb05dce109a@postgrespro.ru> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Hello hackers,

I noticed that exit_hook_registered variable in start_postmaster() is 
local variable. Shouldn't it be a static variable?

I attached a patch. Thank you!

-- 
Artur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachments:

pg-upgrade-atexit.patch (text/x-patch, 580B) download diff --git a/src/bin/pg_upgrade/server.c b/src/bin/pg_upgrade/server.c index 969e5d6..a13800f 100644 --- a/src/bin/pg_upgrade/server.c +++ b/src/bin/pg_upgrade/server.c @@ -14,6 +14,8 @@ static PGconn *get_db_conn(ClusterInfo *cluster, const char *db_name); +static bool exit_hook_registered = false; + /* * connectToServer() @@ -174,7 +176,6 @@ start_postmaster(ClusterInfo *cluster, bool throw_error) { char cmd[MAXPGPATH * 4 + 1000]; PGconn *conn; - bool exit_hook_registered = false; bool pg_ctl_return = false; char socket_string[MAXPGPATH + 200];

view thread (4+ messages)  latest in thread

Message-ID: <d279e817-02b5-caa6-215f-cfb05dce109a@postgrespro.ru>
Permalink:  ../d279e817-02b5-caa6-215f-cfb05dce109a@postgrespro.ru/
Also on:    postgresql.org/message-id/d279e817-02b5-caa6-215f-cfb05dce109a@postgrespro.ru

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: a.zakirov@postgrespro.ru
  Subject: Re: pg_upgrade: exit_hook_registered variable
  In-Reply-To: <d279e817-02b5-caa6-215f-cfb05dce109a@postgrespro.ru>
  References: <d279e817-02b5-caa6-215f-cfb05dce109a@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox