pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: evgeni@golov.de
Subject: BUG #18625: user-created extensions change ownership to "postgres" after upgrade
Date: Fri, 20 Sep 2024 12:42:37 +0000
Message-ID: <18625-77d1e2609972c616@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      18625
Logged by:          Evgeni Golov
Email address:      evgeni@golov.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".



view thread (6+ messages)  latest in thread

Message-ID: <18625-77d1e2609972c616@postgresql.org>
Permalink:  ../18625-77d1e2609972c616@postgresql.org/
Also on:    postgresql.org/message-id/18625-77d1e2609972c616@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, evgeni@golov.de
  Subject: Re: BUG #18625: user-created extensions change ownership to "postgres" after upgrade
  In-Reply-To: <18625-77d1e2609972c616@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox