Skip to content

Feat: Re-introduce merge for updating auto restatements#5112

Merged
vchan merged 4 commits into
mainfrom
vchan/auto-restatement-merge-2
Aug 13, 2025
Merged

Feat: Re-introduce merge for updating auto restatements#5112
vchan merged 4 commits into
mainfrom
vchan/auto-restatement-merge-2

Conversation

@vchan

@vchan vchan commented Aug 8, 2025

Copy link
Copy Markdown
Collaborator

#5016 was reverted with #5108 because we didn't properly handle fetching server version with pg8000. This PR re-introduces merge for updating auto restatements but with added support for pg8000.

@vchan
vchan force-pushed the vchan/auto-restatement-merge-2 branch from 375b126 to d264a76 Compare August 8, 2025 01:27
Comment thread sqlmesh/core/engine_adapter/postgres.py Outdated
merge_filter=merge_filter,
)

def get_server_version(self) -> t.Tuple[int, int]:

@erindru erindru Aug 8, 2025

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this seems fairly hacky vs just running something like select current_setting('server_version_num') when the EngineAdapter is constructed and storing the result (or even just making this method run the query and use @cached_property to cache the result)

@vchan
vchan force-pushed the vchan/auto-restatement-merge-2 branch from 6ea03ee to 36a56f0 Compare August 8, 2025 18:00
@vchan
vchan force-pushed the vchan/auto-restatement-merge-2 branch from 36a56f0 to 75633b2 Compare August 12, 2025 23:22
@vchan
vchan merged commit 9afc728 into main Aug 13, 2025
25 of 28 checks passed
@vchan
vchan deleted the vchan/auto-restatement-merge-2 branch August 13, 2025 00:03
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