Search Postgresql Archives

pg_restore creates public schema?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



pg_dump 9.6.24
pg_restore 13.8

Why does pg_restore explicitly create "public" even though public is automatically created when the database is created?

I noticed that when using "--exit-on-error".  It's disappointing, because I had to remove that option, which caused the restore to ignore other, actually important errors.)

$ cd /var/lib/pgsql/backups/dumps/2022-10-04
$ pg_restore -vcC --if-exists --jobs=12 -Fd -d postgres CDSLBXW

pg_restore: connecting to database for restore
pg_restore: dropping DATABASE CDSLBXW
pg_restore: processing item 10813 ENCODING ENCODING
pg_restore: processing item 10814 STDSTRINGS STDSTRINGS
pg_restore: processing item 10815 SEARCHPATH SEARCHPATH
pg_restore: processing item 10816 DATABASE CDSLBXW
pg_restore: creating DATABASE "CDSLBXW"
pg_restore: connecting to new database "CDSLBXW"
pg_restore: processing item 14 SCHEMA cds
pg_restore: creating SCHEMA "cds"
pg_restore: processing item 18 SCHEMA dba
pg_restore: creating SCHEMA "dba"
pg_restore: processing item 10 SCHEMA public
pg_restore: creating SCHEMA "public"
pg_restore: while PROCESSING TOC:
pg_restore: from TOC entry 10; 2615 2200 SCHEMA public postgres
pg_restore: error: could not execute query: ERROR:  schema "public" already exists
Command was: CREATE SCHEMA public;



--
Angular momentum makes the world go 'round.





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux