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

Update bundled PostgreSQL to 16.4 #7804

Merged
merged 3 commits into from
Oct 2, 2024
Merged

Update bundled PostgreSQL to 16.4 #7804

merged 3 commits into from
Oct 2, 2024

Conversation

scotttrinh
Copy link
Contributor

Uses tag: REL_16_4. Also updates our allowlist for set_config calls to support change introduced in 16.4 in postgres/postgres@66e9444

Comment on lines +212 to +220
if (
isinstance(value, pgast.StringConstant)
and isinstance(is_local, pgast.BooleanConstant)
):
if (
value.val == "view, foreign-table"
and not is_local.val
):
return value
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer not to do this here, because we are not checking the name of the setting being set. But to check that, we need the full query, because it is of this form:

SELECT set_config(name, ..., ...) FROM pg_setting WHERE name = '...'

I'll add a pre-resolving step that convert such SELECT set_configs into SET commands, which we do handle correctly.

Copy link
Contributor

Choose a reason for hiding this comment

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

I've tried that in #7810, but it turns out that if we compile SELECT set_config into SET, we need to inject a result set and CommandComplete message, which is hard/complex to do.

So I might abandon that effort and fix your approach instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

We will not abandon that effort, but just put it off until some later time.

For now, this workaround is good enough. Let's hope no one will use "view, foreign-table" setting value anywhere...

@aljazerzen aljazerzen merged commit 6211937 into master Oct 2, 2024
23 checks passed
@aljazerzen aljazerzen deleted the bump-pg-16.4 branch October 2, 2024 17:02
aljazerzen added a commit that referenced this pull request Oct 23, 2024
Uses tag: REL_16_4. Also updates our allowlist for `set_config` calls to
support change introduced in 16.4 in
postgres/postgres@66e9444

---------

Co-authored-by: Aljaž Mur Eržen <[email protected]>
@aljazerzen aljazerzen added backported-5.x PRs that *have* been backported to 5.x (starting with 5.3) and removed to-backport-5.x labels Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported-5.x PRs that *have* been backported to 5.x (starting with 5.3)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants