pgpool / pgpool2

This is the official mirror of git://git.postgresql.org/git/pgpool2.git. Note that this is just a *mirror* - we don't work with pull requests on github. Please subscribe to pgpool-hackers mailing list from our website and submit your patch to this mailing list.
https://www.pgpool.net
Other
333 stars 88 forks source link

Transactional continuity question #74

Closed Sudingyi closed 4 days ago

Sudingyi commented 5 days ago

Hello I want to ask when I connect to the pgpool back-end cluster to switch, if I am a write operation failed in read and write separation, the subsequent execution is still in a transaction?

pengbo0328 commented 4 days ago

Hello I want to ask when I connect to the pgpool back-end cluster to switch, if I am a write operation failed in read and write separation, the subsequent execution is still in a transaction?

If a write query fails, the transaction will be aborted, and subsequent queries will be ignored until the end of the transaction block.

Sudingyi commented 4 days ago

Hello I want to ask when I connect to the pgpool back-end cluster to switch, if I am a write operation failed in read and write separation, the subsequent execution is still in a transaction?

If a write query fails, the transaction will be aborted, and subsequent queries will be ignored until the end of the transaction block.

Ignoring means that the client gets a failed exception when the subsequent transaction is queried.The user will not get the information of transaction termination or rollback.Only when the user opens the next new transaction will it be processed normally. I hope you will reply again thank you.

pengbo0328 commented 4 days ago

Ignoring means that the client gets a failed exception when the subsequent transaction is queried.The user will not get the information of transaction termination or rollback.

Yes. The queries fail unless you run an abort or rollback.

Only when the user opens the next new transaction will it be processed normally.

Yes.