WAIT FOR command should do some query jumbling - #414
Open
pg-hub-mirror[bot] wants to merge 1 commit into
Open
pg-hub-mirror[bot] wants to merge 1 commit into
pg-hub-mirror[bot] wants to merge 1 commit into
Conversation
The LSN target has been normalized since 447aae1 and the follow-up in this thread, but the WITH clause has not, so waits that differ only in how long they may take get an entry each, and writing the same options in a different order gets another one: WAIT FOR LSN $1 WITH (mode 'primary_flush', timeout '5ms') WAIT FOR LSN $1 WITH (mode 'primary_flush', timeout '7ms') WAIT FOR LSN $1 WITH (timeout '5ms', mode 'primary_flush') Give WaitStmt.options a custom jumble function that walks the recognized options in a fixed order rather than in the order written, so the last of those joins the first. Record TIMEOUT as a constant, since it only bounds how long the command may wait, which merges the first two and prints the value as a parameter. MODE and NO_THROW select what the command does, so their values are still jumbled and each mode keeps its own entry. Do not normalize option values generically. What a value means differs per option, and only the command knows: the parser has the same problem with SET and solves it with VariableSetStmt.jumble_args, set per grammar flavor. DefElem.arg_location is added for the benefit of the above, but nothing else reads it, so no other statement changes. Discussion: https://postgr.es/m/1f04f78c-2cfa-47a0-997f-f02572cd10eb%40eisentraut.org
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pgsql-hackersCAPpHfdt1Zasx9AuXgn8w0fqcMHffqWcC4yPrVq-A5Ok+6DWY_A@mail.gmail.comPatch files:
Hi!
On Thu, Sep 3, 2026 at 6:38 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
Regards,
Alexander Korotkov
Supabase