Closed ronyb29 closed 1 year ago
Please rebase. This seems to be on top of an ancient revision.
hey guys,
Apart from the ones in this PR libpq also has read-write
and read-only
, but I didn't see much use for them, I got the impression they were the "old" version of the attributes.
Is there a scenario where those are still valuable? or are primary
and standby
and prefer_standby
enough for practical use cases?
from This blogpost on https://www.cybertec-postgresql.com
PostgreSQL v14 introduces these new options:
read-only: only connect to a server that does not allow data modifications. This is the converse of read-write.
primary: only connect to a database that is not a streaming replication standby.
standby: only connect to a streaming replication standby.
prefer-standby: connect to a standby server if there is one. Only if there is no standby server on the list, accept a connection to a server that is not in recovery mode.
You are probably confused by the distinction between “read-only” and “standby” or between “read-write” and “primary”.
The difference is subtle: if the parameter “default_transaction_read_only” is set to “on”, a server can be read-only even if it is not a streaming replication standby server.
So it looks like there is a subtle difference and a use case for read-write
and read-only
@ronyb29 is there anything I can do to help ?
@ronyb29 do you intend to finish this PR? If not (or unresponsive) I'll fork your fork as it is a good start and make my own PR.
Superseded by #987
@elprans Is there anything I can do to help move this PR along ?