pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedRestoring Database on Version 11 does not restore database comment
4+ messages / 3 participants
[nested] [flat]
* Restoring Database on Version 11 does not restore database comment
@ 2020-11-20 22:57 George Weaver <gweaver@shaw.ca>
2020-11-20 23:01 ` Re: Restoring Database on Version 11 does not restore database comment David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: George Weaver @ 2020-11-20 22:57 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Good afternoon,
If I backup a PostgreSQL 10.14 database using pg_dump from Version
11.10, and restore to Version 11, the comment for the database is lost.
I haven't encountered this before when upgrading between major versions.
Test case:
C:\Program Files\PostgreSQL\10\bin>psql
psql (10.14)
postgres=# CREATE DATABASE test_comment TEMPLATE = template0;
CREATE DATABASE
postgres=# COMMENT ON DATABASE test_comment IS 'Test Comment Database';
COMMENT
postgres=# SELECT pg_catalog.shobj_description(d.oid, 'pg_database') as
"Version"
postgres-# FROM pg_catalog.pg_database d
postgres-# where d.datname = 'test_comment';
Version
-----------------------
Test Comment Database
(1 row)
C:\Program Files\PostgreSQL\11\bin>pg_dump -h localhost -p 5433 -U
postgres -f "G:\test_comment.bak" -Fc -O test_comment
C:\Program Files\PostgreSQL\11\bin>psql -p 5435
psql (11.10)
postgres=# CREATE DATABASE test_comment TEMPLATE = template0;
CREATE DATABASE
postgres=# \q
C:\Program Files\PostgreSQL\11\bin>pg_Restore -p 5435 -U postgres -d
test_comment "G:\test_comment.bak"
C:\Program Files\PostgreSQL\11\bin>psql -p 5435
psql (11.10)
postgres=# SELECT pg_catalog.shobj_description(d.oid, 'pg_database') as
"Version"
postgres-# FROM pg_catalog.pg_database d
postgres-# where d.datname = 'test_comment';
Version
---------
(1 row)
What am I missing?
Thanks,
George
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Restoring Database on Version 11 does not restore database comment
2020-11-20 22:57 Restoring Database on Version 11 does not restore database comment George Weaver <gweaver@shaw.ca>
@ 2020-11-20 23:01 ` David G. Johnston <david.g.johnston@gmail.com>
2020-11-20 23:12 ` Re: Restoring Database on Version 11 does not restore database comment Bruce Momjian <bruce@momjian.us>
2020-11-21 00:27 ` Re: Restoring Database on Version 11 does not restore database comment George Weaver <gweaver@shaw.ca>
0 siblings, 2 replies; 4+ messages in thread
From: David G. Johnston @ 2020-11-20 23:01 UTC (permalink / raw)
To: George Weaver <gweaver@shaw.ca>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
On Fri, Nov 20, 2020 at 3:58 PM George Weaver <gweaver@shaw.ca> wrote:
> What am I missing?
>
>
Release notes.
https://www.postgresql.org/docs/11/release-11.html
"pg_dump and pg_restore, without --create, no longer dump/restore
database-level comments and security labels; those are now treated as
properties of the database."
David J.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Restoring Database on Version 11 does not restore database comment
2020-11-20 22:57 Restoring Database on Version 11 does not restore database comment George Weaver <gweaver@shaw.ca>
2020-11-20 23:01 ` Re: Restoring Database on Version 11 does not restore database comment David G. Johnston <david.g.johnston@gmail.com>
@ 2020-11-20 23:12 ` Bruce Momjian <bruce@momjian.us>
1 sibling, 0 replies; 4+ messages in thread
From: Bruce Momjian @ 2020-11-20 23:12 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: George Weaver <gweaver@shaw.ca>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
On Fri, Nov 20, 2020 at 04:01:26PM -0700, David G. Johnston wrote:
> On Fri, Nov 20, 2020 at 3:58 PM George Weaver <gweaver@shaw.ca> wrote:
>
> What am I missing?
>
>
>
> Release notes.
>
> https://www.postgresql.org/docs/11/release-11.html
>
> "pg_dump and pg_restore, without --create, no longer dump/restore
> database-level comments and security labels; those are now treated as
> properties of the database."
Yeah, I realize this new behavior is kind of odd, but logically, it
makes sense.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Restoring Database on Version 11 does not restore database comment
2020-11-20 22:57 Restoring Database on Version 11 does not restore database comment George Weaver <gweaver@shaw.ca>
2020-11-20 23:01 ` Re: Restoring Database on Version 11 does not restore database comment David G. Johnston <david.g.johnston@gmail.com>
@ 2020-11-21 00:27 ` George Weaver <gweaver@shaw.ca>
1 sibling, 0 replies; 4+ messages in thread
From: George Weaver @ 2020-11-21 00:27 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Thanks David!
Missed that...
On 20/11/2020 5:01 p.m., David G. Johnston wrote:
> On Fri, Nov 20, 2020 at 3:58 PM George Weaver <gweaver@shaw.ca
> <mailto:gweaver@shaw.ca>> wrote:
>
> What am I missing?
>
>
> Release notes.
>
> https://www.postgresql.org/docs/11/release-11.html
> <https://www.postgresql.org/docs/11/release-11.html;
>
> "pg_dump and pg_restore, without --create, no longer dump/restore
> database-level comments and security labels; those are now treated as
> properties of the database."
>
> David J.
>
--
Cleartag Software, Inc.
972 McMillan Avenue
Winnipeg, MB
R3M 0V7
(204) 284-9839 phone/cell
(204) 284-9838 fax
gweaver@cleartagsoftware.com
Fast. Accurate. Easy.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2020-11-21 00:27 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-11-20 22:57 Restoring Database on Version 11 does not restore database comment George Weaver <gweaver@shaw.ca>
2020-11-20 23:01 ` David G. Johnston <david.g.johnston@gmail.com>
2020-11-20 23:12 ` Bruce Momjian <bruce@momjian.us>
2020-11-21 00:27 ` George Weaver <gweaver@shaw.ca>
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