BUG #18625: user-created extensions change ownership to "postgres" after upgrade

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: evgeni(at)golov(dot)de
Subject: BUG #18625: user-created extensions change ownership to "postgres" after upgrade
Date: 2024-09-20 12:42:37
Message-ID: 18625-77d1e2609972c616@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 18625
Logged by: Evgeni Golov
Email address: evgeni(at)golov(dot)de
PostgreSQL version: 16.4
Operating system: CentOS Stream 9, Debian 12
Description:

Hi,

when upgrading 15 to 16 (but also observed the same on 12 to 13), an
extension that was previously created by a "normal" user is now owned by
"postgres":

psql (15.8 (Debian 15.8-0+deb12u1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384,
compression: off)
Type "help" for help.

foreman=> create extension cube;
CREATE EXTENSION
foreman=> select * from pg_extension;
oid | extname | extowner | extnamespace | extrelocatable | extversion |
extconfig | extcondition
-------+---------+----------+--------------+----------------+------------+-----------+--------------
13559 | plpgsql | 10 | 11 | f | 1.0 |
|
16386 | cube | 16384 | 2200 | t | 1.5 |
|

<upgrade to 16.4 via apt.postgresql.org>

foreman=> select * from pg_extension;
oid | extname | extowner | extnamespace | extrelocatable | extversion |
extconfig | extcondition
-------+---------+----------+--------------+----------------+------------+-----------+--------------
13562 | plpgsql | 10 | 11 | f | 1.0 |
|
16386 | cube | 10 | 2200 | t | 1.5 |
|
(2 rows)

Interestingly, the entry in pg_shdepend is still owned by the user.

foreman=> select * from pg_shdepend;
dbid | classid | objid | objsubid | refclassid | refobjid | deptype
------+---------+-------+----------+------------+----------+---------
0 | 1262 | 16385 | 0 | 1260 | 16384 | o
(1 row)

I am reading https://postgrespro.com/list/thread-id/2333512 as "those two
should match".

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2024-09-20 13:02:15 BUG #18626: Using ampersand (&) in password fails installation.
Previous Message David Rowley 2024-09-20 10:42:27 Re: Volatile functions under Memoize node