Re: A weird bit in pg_upgrade/exec.c

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: a(dot)akenteva(at)postgrespro(dot)ru
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: A weird bit in pg_upgrade/exec.c
Date: 2017-11-09 16:06:08
Message-ID: 20171109160608.ix24ajduhlzeiz44@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

a(dot)akenteva(at)postgrespro(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-11-09 16:17:26 Re: A weird bit in pg_upgrade/exec.c
Previous Message Tom Lane 2017-11-09 15:40:31 Re: Pg V10: Patch for bug in bonjour support