Обсуждение: BUG #18376: pg_upgrade fails trying to restore privileges on retired function pg_start_backup and pg_stop_backup

Поиск
Список
Период
Сортировка
The following bug has been logged on the website:

Bug reference:      18376
Logged by:          Marc Rechté
Email address:      mrechte@gmail.com
PostgreSQL version: 16.2
Operating system:   RHEL 8 (clone)
Description:

We got a pg_upgrade failure when upgrading from a PG14 to a PG16 instance:

pg_restore: de l'entrée TOC 3279 ; 0 0 ACL FUNCTION
"pg_start_backup"("label" "text", "fast" boolean, "exclusive" boolean)
postgres
pg_restore: erreur : could not execute query: ERROR:  function
pg_catalog.pg_start_backup(text, boolean, boolean) does not exist
La commande était : GRANT ALL ON FUNCTION
"pg_catalog"."pg_start_backup"("label" "text", "fast" boolean, "exclusive"
boolean) TO "barman";

Those functions being dropped in PG15, one should not try to restore
privileges on them.


On Mon, Mar 04, 2024 at 09:56:35AM +0000, PG Bug reporting form wrote:
> Those functions being dropped in PG15, one should not try to restore
> privileges on them.

This is a known issue, and it is much larger than just ACLs on
functions, because we need to take care of much more object types.
Another area is catalog attribute renames, for example.  See this
thread:
https://www.postgresql.org/message-id/f85991ad-bbd4-ad57-fde4-e12f0661dbf0%40postgrespro.ru

A patch has been proposed there, but I don't think we were much happy
about the fact to plug in this knowledge directly to pg_upgrade,
because at some extent this also impacts logical dumps taken from
older versions, and even logical replication setups.
--
Michael

Вложения