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