Re: BUG #16732: pg_dump creates broken backups

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Zsolt Ero <zsolt(dot)ero(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16732: pg_dump creates broken backups
Date: 2020-11-21 17:06:38
Message-ID: 20201121170638.GA10288@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-11-21 17:36:39 Re: BUG #16737: error running compiled C program with connection to Postgres
Previous Message Victor Yegorov 2020-11-21 13:59:24 Re: BUG #16738: Migration from 12th to 13th version. pg_upgrade error (relation "pg_catalog.pg_pltemplate")