Re: dead code in pg_upgrade - Mailing list pgsql-hackers

From Tom Lane
Subject Re: dead code in pg_upgrade
Date
Msg-id 4076507.1742234209@sss.pgh.pa.us
Whole thread Raw
In response to dead code in pg_upgrade  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: dead code in pg_upgrade
List pgsql-hackers
Nathan Bossart <nathandbossart@gmail.com> writes:
> I noticed that the condition it's referring to
>         if (strlen(old_cluster.tablespace_suffix) == 0)
> doesn't appear to have been reachable since support for upgrading from
> pre-9.2 was removed in v15 (commit e469f0a).  Before then, this case seems
> to have only applied to upgrades from v8.4 or older versions.

> I'm planning to commit the attached patch shortly after I double-check that
> I'm not missing anything.

+1.  e469f0aaf just removed code that was immediately connected to a
version check; I didn't look too hard for consequent simplifications.
After looking, I concur that tablespace_suffix can never be empty
anymore.  I don't see any other spots checking this condition.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Update Unicode data to Unicode 16.0.0
Next
From: Daniil Davydov
Date:
Subject: Re: Forbid to DROP temp tables of other sessions