From: Tom Lane <tgl@sss.pgh.pa.us>
To: emesika@redhat.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7792: pg_dump does not treat -c flag correctly when using tar format
Date: Sun, 06 Jan 2013 19:32:06 -0500
Message-ID: <10105.1357518726@sss.pgh.pa.us> (raw)
In-Reply-To: <E1TrqX7-0002qd-4e@wrigleys.postgresql.org>
References: <E1TrqX7-0002qd-4e@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
emesika@redhat.com writes:
> 1) pg_dump -F t -U postgres -f test.tar test
> 2) tar xvf test.tar to any directory
> 3) vi restore.sql
> * restore.sql includes DROP statements for each object even tough -c flag
> was not given
I believe this is intentional - at least, pg_backup_tar.c goes out of
its way to make it happen. (The forcible setting of ropt->dropSchema
in _CloseArchive is the cause, and it's hard to see why that would be
there unless the author intended this effect.) Perhaps we should remove
that, but it would be an incompatible change. Arguing for or against
it really requires a model of what people would be doing with the
restore.sql script. I'm not entirely convinced that it should be
considered equivalent to what you'd get from a plain dump run.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, emesika@redhat.com
Subject: Re: BUG #7792: pg_dump does not treat -c flag correctly when using tar format
In-Reply-To: <10105.1357518726@sss.pgh.pa.us>
References: <E1TrqX7-0002qd-4e@wrigleys.postgresql.org> <10105.1357518726@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