Re: obsolete code in pg_upgrade

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: obsolete code in pg_upgrade
Date: 2017-08-23 13:36:40
Message-ID: CA+TgmobzLSoygA0umwH6mRBQnPhEvGdFCVF-Rss_vHQMbb6bcQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 22, 2017 at 8:28 PM, Peter Eisentraut
<peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
> It seems to me that this code in pg_upgrade/check.c has been useless
> since at least version 9.1:
>
> /* Is it 9.0 but without tablespace directories? */
> if (GET_MAJOR_VERSION(new_cluster.major_version) == 900 &&
> new_cluster.controldata.cat_ver < TABLE_SPACE_SUBDIRS_CAT_VER)
> pg_fatal("This utility can only upgrade to PostgreSQL version
> 9.0 after 2010-01-11\n"
> "because of backend API changes made during
> development.\n");

I think I agree. It seems to me that the version of pg_upgrade
shipped with release N only needs to support upgrades to release N,
not older releases. There's probably room for debate about whether a
pg_upgrade needs to support direct upgrades FROM very old releases,
but we need not decide anything about that right now.

I think you could go ahead and rip out this code, but as it seems like
a non-critical change, -1 for back-patching it.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-08-23 13:40:59 Re: locale problem of bgworker: logical replication launcher and worker process
Previous Message Pavel Stehule 2017-08-23 12:55:09 Re: proposal: psql command \graw