pg_dumpall and owner of the extension

Поиск
Список
Период
Сортировка
От kaido vaikla
Тема pg_dumpall and owner of the extension
Дата
Msg-id CA+427g-YecPcvrHLJjoP92gDQy199qvvKCj_OvXhR3qmeu0zRQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: pg_dumpall and owner of the extension  (Laurenz Albe <laurenz.albe@cybertec.at>)
Re: pg_dumpall and owner of the extension  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
Hi,

pg_pumpall (13.4) changes owner of the extension.

Source instance 13.4:
function boolop is part of extension intarray

diam=# \dx intarray
                                   List of installed extensions
   Name   | Version | Schema |                            Description
----------+---------+--------+--------------------------------------------------------------------
 intarray | 1.3     | iamapp | functions, operators, and index support for 1-D arrays of integers
(1 row)

diam=# \dn iamapp
   List of schemas
  Name  |    Owner
--------+-------------
 iamapp | iamappadmin
(1 row)

diam=# \df+ iamapp.boolop
List of functions
-[ RECORD 1 ]-------+-----------------------------
Schema              | iamapp
Name                | boolop
Result data type    | boolean
Argument data types | integer[], iamapp.query_int
Type                | func
Volatility          | immutable
Parallel            | safe
Owner               | iamappadmin
Security            | invoker
Access privileges   |
Language            | c
Source code         | boolop
Description         | boolean operation with array

Export is done using pg_dumpall.

Dest instance 15.4:
After import (psql -a -f )
diam=# \dx intarray
                                   List of installed extensions
   Name   | Version | Schema |                            Description
----------+---------+--------+--------------------------------------------------------------------
 intarray | 1.5     | iamapp | functions, operators, and index support for 1-D arrays of integers
(1 row)

diam=# \dn iamapp
   List of schemas
  Name  |    Owner
--------+-------------
 iamapp | iamappadmin
(1 row)

diam=# \df+ iamapp.boolop
List of functions
-[ RECORD 1 ]-------+-----------------------------
Schema              | iamapp
Name                | boolop
Result data type    | boolean
Argument data types | integer[], iamapp.query_int
Type                | func
Volatility          | immutable
Parallel            | safe
Owner               | postgres
Security            | invoker
Access privileges   |
Language            | c
Source code         | boolop
Description         | boolean operation with array



Manual says "The user who runs CREATE EXTENSION becomes the owner of the extension".
So pg_dumpall is not aware  who ran "CREATE EXTENSION"?

br
Kaido

В списке pgsql-admin по дате отправления:

Предыдущее
От: Holger Jakobs
Дата:
Сообщение: Re: failed to setup barman backup when Posgres is running in Podman Container
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: pg_dumpall and owner of the extension