8000 Fix transforming UPDATE messages WHERE/SET clauses. by dimitri · Pull Request #333 · dimitri/pgcopydb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix transforming UPDATE messages WHERE/SET clauses. #333

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

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

dimitri
Copy link
Owner
@dimitri dimitri commented Jun 21, 2023

The logical decoding messages both from test_decoding and wal2json might contain the same column in both WHERE and SET clauses with the same value. When that's the case, it's best to reduce the UPDATE statement and refrain from adding the same column-value pair in both clauses.

Also that's not just an optimisation now, as without this the following could happen:

ERROR:  column "id" can only be updated to DEFAULT
DETAIL:  Column "id" is an identity column defined as GENERATED ALWAYS.

Fixes #313

The logical decodi
8000
ng messages both from test_decoding and wal2json might
contain the same column in both WHERE and SET clauses with the same value.
When that's the case, it's best to reduce the UPDATE statement and refrain
from adding the same column-value pair in both clauses.

Also that's not just an optimisation now, as without this the following
could happen:

    ERROR:  column "id" can only be updated to DEFAULT
    DETAIL:  Column "id" is an identity column defined as GENERATED ALWAYS.
@dimitri dimitri force-pushed the fix/transform-update-set-where-clauses branch from edf8633 to 35e6787 Compare June 21, 2023 12:40
@dimitri dimitri merged commit e268fe6 into main Jun 21, 2023
@dimitri dimitri deleted the fix/transform-update-set-where-clauses branch June 21, 2023 13:12
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.

ERROR Failed to find old-key in UPDATE message
1 participant
0