Re: pg_dump/pg_restore vs default_transaction_read_only under PG 13.2

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: pg_dump/pg_restore vs default_transaction_read_only under PG 13.2
Date: 2021-06-25 09:50:09
Message-ID: YNWm0dARbCfEgV+c@hermes.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Am Fri, Jun 25, 2021 at 11:39:46AM +0200 schrieb Karsten Hilbert:

> I would be happy to hope that pg_dump might
...
> gain a --do-not-alter-database-to-read-only

or even a --(pre|post)-dump-sql=(pre|post).sql allowing for
(here) temporarily altering a role to
default_transaction_read_only=off/on while dumping. If both
pre and post SQL are idempotent they can be applied by
pg_dump regardless of dump failure/success.

But then I can see how that might aggravate remote debugging
by people going "uh, like, we are going to shell out and
temporarily relocate tablespaces to faster storage during
dump" or some such.

Karsten
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Morgenstern 2021-06-25 10:29:41 Difference between text_pattern_ops and varchar_pattern_ops
Previous Message Karsten Hilbert 2021-06-25 09:39:46 Re: pg_dump/pg_restore vs default_transaction_read_only under PG 13.2