Skip to content
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

Fix default_transaction_isolation on system/database level #8312

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

fantix
Copy link
Member

@fantix fantix commented Feb 6, 2025

client GucSource (backend connection parameter) has higher priority than database or configuration file (system). Now that default_transaction_isolation is exposed, it has to be removed from the backend connection parameters. Instead, it now becomes a permanent system config that always has a value.

This breaks remote backends without config file access unless they are preconfigured with default_transaction_isolation = serializable system-wide.

Refs #8276

  • Add test

@fantix fantix requested review from msullivan and elprans February 6, 2025 00:53
Comment on lines 153 to 154
# Special case for default_transaction_isolation:
# Gel default is `serializable`, while PG default is `read committed`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call this out as a HACK in the comments.
Some day we may want this to be a general mechanism?
(Not today.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, now that I'm thinking more about it, maybe we should always reset the system backend settings to their Gel defaults explicitly, as we cannot rely on the backend defaults, like users could put anything in postgresql.conf and run Gel with --backend-dsn.

@msullivan
Copy link
Member

Actually wait, I don't fully understand; when does default_transaction_isolation get set, in the normal flow?

@fantix
Copy link
Member Author

fantix commented Feb 6, 2025

Actually wait, I don't fully understand; when does default_transaction_isolation get set, in the normal flow?

During bootstrap, backend settings that have defaults are applied to the PG config file?

@msullivan
Copy link
Member

Actually wait, I don't fully understand; when does default_transaction_isolation get set, in the normal flow?

During bootstrap, backend settings that have defaults are applied to the PG config file?

Roger, got it. I had forgotten that step but on reading the code it seems familiar.

@msullivan
Copy link
Member

Wait --- cloud doesn't have configfile access, right?

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.

2 participants