pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: a.akenteva@postgrespro.ru
Cc: pgsql-hackers@postgresql.org
Subject: Re: A weird bit in pg_upgrade/exec.c
Date: Thu, 09 Nov 2017 11:17:26 -0500
Message-ID: <21596.1510244246@sss.pgh.pa.us> (raw)
In-Reply-To: <f9266a85d918a3cf3a386b5148aee666@postgrespro.ru>
References: <f9266a85d918a3cf3a386b5148aee666@postgrespro.ru>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

a.akenteva@postgrespro.ru writes:
> I've came across a weird bit in pg_upgrade/exec.c

> We have a function check_bin_dir() which goes like this (old_cluster and 
> new_cluster are global variables):
> void check_bin_dir(ClusterInfo *cluster)
> {
>      ...
>      get_bin_version(&old_cluster);
>      get_bin_version(&new_cluster);
>      ...
> }

> This function has two calls:
> check_bin_dir(&old_cluster);
> check_bin_dir(&new_cluster);

> I'd like to substitute these last two lines with this:
> get_bin_version(cluster);

Yeah, the way it is now seems outright broken.  It will try to do
get_bin_version on the new cluster before having done validate_exec
there, violating its own comment.

I think we should change this as a bug fix, independently of whatever
else you had in mind to do here.

			regards, tom lane


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



view thread (6+ messages)  latest in thread

Message-ID: <21596.1510244246@sss.pgh.pa.us>
Permalink:  ../21596.1510244246@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21596.1510244246@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, a.akenteva@postgrespro.ru
  Subject: Re: A weird bit in pg_upgrade/exec.c
  In-Reply-To: <21596.1510244246@sss.pgh.pa.us>

* 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