Re: pg_dump/pg_restore vs default_transaction_read_only under PG 13.2 - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_dump/pg_restore vs default_transaction_read_only under PG 13.2
Date
Msg-id 1513081.1624212870@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump/pg_restore vs default_transaction_read_only under PG 13.2  (Vijaykumar Jain <vijaykumarjain.github@gmail.com>)
List pgsql-general
Vijaykumar Jain <vijaykumarjain.github@gmail.com> writes:
> i have db example which i want to migrate from one version to another.
> to do that i disable writes on the db by setting the tx flag, so that i can
> be sure it is still serving reads, but no additional data is written.
> i can take a pg_dump, the db is still serving the reads.

What is the point of that?  pg_dump will capture a consistent data
snapshot in any case.  AFAICS, all you accomplish by disabling
writes on the source server is a self-inflicted DOS.

(Also, the fact that default_transaction_read_only is so easy to
override means it's not that useful as a means of disabling writes.)

            regards, tom lane



pgsql-general by date:

Previous
From: Vijaykumar Jain
Date:
Subject: Re: pg_dump/pg_restore vs default_transaction_read_only under PG 13.2
Next
From: Karsten Hilbert
Date:
Subject: Re: pg_dump/pg_restore vs default_transaction_read_only under PG 13.2