Re: pg_upgrade from 8.3.4 issue - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_upgrade from 8.3.4 issue
Date
Msg-id 25659.1314733658@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_upgrade from 8.3.4 issue  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: pg_upgrade from 8.3.4 issue
Re: pg_upgrade from 8.3.4 issue
List pgsql-general
Merlin Moncure <mmoncure@gmail.com> writes:
> It looks like some time after 8.3 was released that function was
> changed from returning 'record'.  This is making me wonder if the
> upgrade process was ever tested/verified on 8.3.

Not lately, apparently :-(

> I absolutely do not
> advise doing this without taking a lot of precautions, but you might
> force your way past that step with:

I think it'd be a lot safer to modify (or just remove) the test in
pg_upgrade.  It looks like a one-liner:

    prep_status("Checking for prepared transactions");

    res = executeQueryOrDie(conn,
                            "SELECT * "
                            "FROM pg_catalog.pg_prepared_xact()");

    if (PQntuples(res) != 0)
        pg_log(PG_FATAL, "The %s cluster contains prepared transactions\n",
               CLUSTER_NAME(cluster));

There's no reason at all for this code to not use the published API,
which is the pg_prepared_xacts system view.

            regards, tom lane

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: pg_upgrade from 8.3.4 issue
Next
From: Jeff Ross
Date:
Subject: FATAL: terminating connection due to conflict with recovery