Skip to content

Handle write functions and advisory locks #181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 22, 2025
Merged

Conversation

levkk
Copy link
Collaborator

@levkk levkk commented May 22, 2025

Description

Functions that write

There are a couple types of Postgres functions that write:

  • Sequence manipulation, e.g. nextval. Simple to handle: send to primary.
  • Advisory locks. These are more tricky, because they create a session-level state that we can't easily track. To make them work, the client connection that creates a lock will be tied to the server connection until the client disconnects. This effectively turns the pooler into a session mode, just for that client.

@levkk levkk marked this pull request as ready for review May 22, 2025 19:07
@levkk levkk changed the title Handle functions Handle write functions May 22, 2025
@levkk levkk changed the title Handle write functions Handle write functionsand advisory locks May 22, 2025
@levkk levkk changed the title Handle write functionsand advisory locks Handle write functions and advisory locks May 22, 2025
@levkk levkk merged commit 72002ad into main May 22, 2025
4 checks passed
@levkk levkk deleted the levkk-more-write-tests branch May 22, 2025 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant