From: Tom Lane <tgl@sss.pgh.pa.us>
To: Vijaykumar Jain <vijaykumarjain.github@gmail.com>
Cc: Karsten Hilbert <Karsten.Hilbert@gmx.net>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: pg_dump/pg_restore vs default_transaction_read_only under PG 13.2
Date: Sun, 20 Jun 2021 14:14:30 -0400
Message-ID: <1513081.1624212870@sss.pgh.pa.us> (raw)
In-Reply-To: <CAM+6J95KH=6tD85ZiFShMux7A4U-Pt9qf23RyiM8vRinYSrH2A@mail.gmail.com>
References: <YM9xKBUhojhlOLuP@hermes.hilbert.loc>
<1511776.1624211267@sss.pgh.pa.us>
<CAM+6J95KH=6tD85ZiFShMux7A4U-Pt9qf23RyiM8vRinYSrH2A@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, vijaykumarjain.github@gmail.com, Karsten.Hilbert@gmx.net
Subject: Re: pg_dump/pg_restore vs default_transaction_read_only under PG 13.2
In-Reply-To: <1513081.1624212870@sss.pgh.pa.us>
References: <YM9xKBUhojhlOLuP@hermes.hilbert.loc> <1511776.1624211267@sss.pgh.pa.us> <CAM+6J95KH=6tD85ZiFShMux7A4U-Pt9qf23RyiM8vRinYSrH2A@mail.gmail.com> <1513081.1624212870@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox