pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Zsolt Ero <zsolt.ero@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #16732: pg_dump creates broken backups
Date: Sat, 21 Nov 2020 14:06:38 -0300
Message-ID: <20201121170638.GA10288@alvherre.pgsql> (raw)
In-Reply-To: <CAKw-smBhN5S=SDNmNOz-V_Qr+xBDcsW_X4JY3LAO_+cv2Uz62w@mail.gmail.com>

On 2020-Nov-21, Zsolt Ero wrote:

> I didn't state why I'm doing all this: basically all I'd like to do is
> exclude a table when restoring data.
> The only way I managed to do this was to grep -v the list file before data
> only restore.

Why do you do that?  It seems much easier to produce a complete dump,
then obtain the --list from it, do "grep -v" of the TABLE DATA element
for that table, then give that file to pg_restore.  It would restore
everything in the right order, including that table's definition, but
excluding that table's data.





view thread (15+ messages)  latest in thread

Message-ID: <20201121170638.GA10288@alvherre.pgsql>
Permalink:  ../20201121170638.GA10288@alvherre.pgsql/
Also on:    postgresql.org/message-id/20201121170638.GA10288@alvherre.pgsql

 · 

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: alvherre@alvh.no-ip.org, zsolt.ero@gmail.com, tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16732: pg_dump creates broken backups
  In-Reply-To: <20201121170638.GA10288@alvherre.pgsql>

* 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