pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: kravtsov.k@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16514: pg_dump v12 puts CREATE SCHEMA public statement into the backup file
Date: Fri, 26 Jun 2020 16:44:58 -0400
Message-ID: <29861.1593204298@sss.pgh.pa.us> (raw)
In-Reply-To: <16514-3f214ab4550eb8fd@postgresql.org>
References: <16514-3f214ab4550eb8fd@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> I’m experiencing some weird behaviour of pg_dump: based on this thread
> https://www.postgresql.org/message-id/flat/20849.1541638465%40sss.pgh.pa.us#744c293b37793dea0f6e6067...
> , starting from v11 pg_dump should not include CREATE SCHEMA public
> statements to the dump. However, if I run pg_dump v12 with --schema public ,
> it still adds that line to the backup file,

Our interpretation of that is that you've deliberately selected the
schema, so it should be dumped.

> which breaks the ability to
> restore from it

That's rather an overstatement no?  You can just ignore the "already
exists" error.

			regards, tom lane





view thread (2+ messages)

Message-ID: <29861.1593204298@sss.pgh.pa.us>
Permalink:  ../29861.1593204298@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29861.1593204298@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, kravtsov.k@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16514: pg_dump v12 puts CREATE SCHEMA public statement into the backup file
  In-Reply-To: <29861.1593204298@sss.pgh.pa.us>

* 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