Skip to content

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 elprans and msullivan 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.

3 participants