GRANT CONNECT statements not shown after pg_dump - pg_restore from PostgreSQL 9 to PostgreSQL 12

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

GRANT CONNECT statements not shown after pg_dump - pg_restore from PostgreSQL 9 to PostgreSQL 12

Iipponen Timo

A little notification.

 

GRANT CONNECT statements not shown after pg_dump - pg_restore from PostgreSQL 9 to PostgreSQL 12.

 

I created the file with pg_dump (v. 12.2) from the database of the version 9.4.5 and loaded it into the PostgreSQL 12.2 database after creating first manually the corresponding database and all users.

I noted that the new PostgreSQL 12.2 database does not display GRANT CONNECT statements for the database. (grants are shown for schemas, etc. anyway). I looked with PgAdmin 4.20 and psql (v. 12.2) with the commands "\l" and "\du".

GRANT CONNECT statements that I created manually afterwards appear.

However, the hidden connect privileges exists for the database because they work.

(My dump file had DROP DATABASE -commands even I didn't specify "--clean" in any commands.)

 

With regards

 

Timo Iipponen

Reply | Threaded
Open this post in threaded view
|

Re: GRANT CONNECT statements not shown after pg_dump - pg_restore from PostgreSQL 9 to PostgreSQL 12

Tom Lane-2
Iipponen Timo <[hidden email]> writes:
> A little notification.
> GRANT CONNECT statements not shown after pg_dump - pg_restore from PostgreSQL 9 to PostgreSQL 12.

pg_dump doesn't propagate database-level properties unless
you use the --create switch.  (This used to act differently.)

                        regards, tom lane


Reply | Threaded
Open this post in threaded view
|

Re: GRANT CONNECT statements not shown after pg_dump - pg_restore from PostgreSQL 9 to PostgreSQL 12

Iipponen Timo
Thanks

Timo Iipponen


From: Tom Lane <[hidden email]>
Sent: Wednesday, April 15, 2020 12:36:36 AM
To: Iipponen Timo <[hidden email]>
Cc: [hidden email] <[hidden email]>
Subject: Re: GRANT CONNECT statements not shown after pg_dump - pg_restore from PostgreSQL 9 to PostgreSQL 12
 
Iipponen Timo <[hidden email]> writes:
> A little notification.
> GRANT CONNECT statements not shown after pg_dump - pg_restore from PostgreSQL 9 to PostgreSQL 12.

pg_dump doesn't propagate database-level properties unless
you use the --create switch.  (This used to act differently.)

                        regards, tom lane