pg_upgrade from PG-14.5 to PG-15.1 failing due to non-existing function

From: Dimos Stamatakis <dimos(dot)stamatakis(at)servicenow(dot)com>
To: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: pg_upgrade from PG-14.5 to PG-15.1 failing due to non-existing function
Date: 2023-01-25 18:38:55
Message-ID: CO6PR08MB77063D1BC1CA3C115D1E51B5E2CE9@CO6PR08MB7706.namprd08.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

I attempted to perform an upgrade from PG-14.5 to PG-15.1 with pg_upgrade and unfortunately it errors out because of a function that does not exist anymore in PG-15.1.
The function is ‘pg_catalog.close_lb’ and it exists in 14.5 but not in 15.1.
In our scenario we changed the permissions of this function in PG14.5 (via an automated tool) and then pg_upgrade tries to change the permissions in PG15.1 as well.

Steps to reproduce:

1. Run initdb for 14.5
2. Run initdb for 15.1
3. Run psql client on 14.5
* postgres=# REVOKE ALL ON FUNCTION close_lb(line, box) FROM $USER;
4. Run pg_upgrade from 14.5 to 15.1

This will error out because pg_upgrade will attempt to REVOKE the persmissions on close_lb on 15.1.
Is there a way to specify which functions/objects to exclude in pg_upgrade?
Thanks in advance!

Dimos
(ServiceNow)

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2023-01-25 18:44:37 Re: Transparent column encryption
Previous Message Andres Freund 2023-01-25 18:34:47 Re: [PATCH] Make ON CONFLICT DO NOTHING and ON CONFLICT DO UPDATE consistent