Skip to content

Conversation

@ronyb29
Copy link

@ronyb29 ronyb29 commented Sep 9, 2022

No description provided.

@JesseDeLoore
Copy link
Contributor

@elprans Is there anything I can do to help move this PR along ?

@elprans
Copy link
Member

elprans commented Sep 23, 2022

Please rebase. This seems to be on top of an ancient revision.

@ronyb29 ronyb29 force-pushed the target_session_attr branch from 64661ab to bf6033c Compare September 24, 2022 18:23
@ronyb29
Copy link
Author

ronyb29 commented Sep 24, 2022

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?

@JesseDeLoore
Copy link
Contributor

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

@JesseDeLoore
Copy link
Contributor

@ronyb29 is there anything I can do to help ?

@JesseDeLoore
Copy link
Contributor

@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.

@elprans
Copy link
Member

elprans commented May 8, 2023

Superseded by #987

@elprans elprans closed this May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants