Vijaykumar Jain <vijaykumarjain.github@xxxxxxxxx> 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