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-22 14:45:34
Message-ID: 20201122144534.GA22488@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Zsolt Ero 2020-11-22 14:49:15 Re: BUG #16732: pg_dump creates broken backups
Previous Message Susanne & Udo Krause 2020-11-22 14:37:03 probably reason of failure - not visible of false positive