Re: [HACKERS] A weird bit in pg_upgrade/exec.c - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [HACKERS] A weird bit in pg_upgrade/exec.c
Date
Msg-id 20171109160608.ix24ajduhlzeiz44@alvherre.pgsql
Whole thread Raw
In response to [HACKERS] A weird bit in pg_upgrade/exec.c  (a.akenteva@postgrespro.ru)
Responses Re: [HACKERS] A weird bit in pg_upgrade/exec.c  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
a.akenteva@postgrespro.ru wrote:

> 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);

Odd indeed.  One would think that if a cluster variable is passed as
parameter, the global vars should not be used.  +1 for fixing it, and
your proposal sounds as good as any.

> Doing it would simplify the patch I'm writing, but I'm worried I might break
> something that's been there for a long time and has been working fine.

I think odd coding this was introduced recently because of the
pg_resetxlog -> pg_resetwal renaming.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Pg V10: Patch for bug in bonjour support
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] A weird bit in pg_upgrade/exec.c