Re: BUG #16732: pg_dump creates broken backups - Mailing list pgsql-bugs

From Zsolt Ero
Subject Re: BUG #16732: pg_dump creates broken backups
Date
Msg-id CAKw-smB5MHS8ih5QnwbhsojAhoFGpn4+jHx+5zVS9yvvonUuqA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #16732: pg_dump creates broken backups  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: BUG #16732: pg_dump creates broken backups
List pgsql-bugs
I get it. But then I need a separate step for the missing table's schema, right?

On 2020. Nov 22., Sun at 15:45, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
On 2020-Nov-22, Zsolt Ero wrote:

> Can you help me how can I do this?
>
> Here is what I was doing before, which triggered the bug:
>
> pg_restore --schema-only --format=custom --single-transaction $BACKUP_FILE
>
> pg_restore --list $BACKUP_FILE > dump_list.full
> grep -v "public events_map" dump_list.full > dump_list.main
>
> pg_restore --data-only --format=custom --use-list=dump_list.main --jobs=4
> $BACKUP_FILE

I'd do this:

pg_restore --list $BACKUP_FILE | grep -v "TABLE DATA public events_map" > dump_list
pg_restore -j4 --use_list=dump_list $BACKUP_FILE

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #16732: pg_dump creates broken backups
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #16732: pg_dump creates broken backups