From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | Dimitrios Apostolou <jimis(at)gmx(dot)net>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Experience and feedback on pg_restore --data-only |
Date: | 2025-03-24 18:41:35 |
Message-ID: | b61855b9dd042f35c1b1727d30bb92946d3c8c3a.camel@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, 2025-03-24 at 16:51 +0100, Dimitrios Apostolou wrote:
> Laurenz informed me that I could avoid writing to the WAL if I "create and
> load the table in a single transaction".
> I haven't tried, but here is what I would do to try --single-transaction:
>
> Transaction 1: manually issuing all of CREATE TABLE etc.
>
> Transaction 2: pg_restore --single-transaction --data-only
>
> The COPY command in transaction 2 would still need to write to WAL, since
> it's separate from the CREATE TABLE.
>
> Am I wrong somewhere?
No, that is correct.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Nathan Bossart | 2025-03-24 20:47:42 | Re: Disabling vacuum truncate for autovacuum |
Previous Message | Laurenz Albe | 2025-03-24 18:39:17 | Re: Experience and feedback on pg_restore --data-only |