-
Notifications
You must be signed in to change notification settings - Fork 695
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
A logic bug caused by a UPDATE statement with distributed table #7782
Labels
Comments
colm-mchugh
added a commit
that referenced
this issue
Jan 16, 2025
colm-mchugh
added a commit
that referenced
this issue
Feb 20, 2025
colm-mchugh
added a commit
that referenced
this issue
Feb 20, 2025
colm-mchugh
added a commit
that referenced
this issue
Feb 20, 2025
DESCRIPTION: fix a planning error caused by a redundant WHERE clause (of the form WHERE true OR <expression>) Fix a Citus planning glitch, where the WHERE clause of the query is of the form: ` WHERE true OR <expression with 1 or more citus tables> ` and this is the only place in the query referencing a citus table. Postgres' standard planner transforms the WHERE clause to: ` WHERE true ` So the query now has no citus tables, confusing the Citus planner as described in issues #7782 and #7783. The fix is to check, after Postgres standard planner, if the Query has been transformed as shown, and re-run the check of whether or not the query needs distributed planning.
colm-mchugh
added a commit
that referenced
this issue
Feb 21, 2025
DESCRIPTION: fix a planning error caused by a redundant WHERE clause (of the form WHERE true OR <expression>) Fix a Citus planning glitch, where the WHERE clause of the query is of the form: ` WHERE true OR <expression with 1 or more citus tables> ` and this is the only place in the query referencing a citus table. Postgres' standard planner transforms the WHERE clause to: ` WHERE true ` So the query now has no citus tables, confusing the Citus planner as described in issues #7782 and #7783. The fix is to check, after Postgres standard planner, if the Query has been transformed as shown, and re-run the check of whether or not the query needs distributed planning.
colm-mchugh
added a commit
that referenced
this issue
Feb 21, 2025
DESCRIPTION: fix a planning error caused by a redundant WHERE clause (of the form WHERE true OR <expression>) Fix a Citus planning glitch, where the WHERE clause of the query is of the form: ` WHERE true OR <expression with 1 or more citus tables> ` and this is the only place in the query referencing a citus table. Postgres' standard planner transforms the WHERE clause to: ` WHERE true ` So the query now has no citus tables, confusing the Citus planner as described in issues #7782 and #7783. The fix is to check, after Postgres standard planner, if the Query has been transformed as shown, and re-run the check of whether or not the query needs distributed planning.
colm-mchugh
added a commit
that referenced
this issue
Feb 24, 2025
DESCRIPTION: fix a planning error caused by a redundant WHERE clause (of the form WHERE true OR <expression>) Fix a Citus planning glitch, where the WHERE clause of the query is of the form: ` WHERE true OR <expression with 1 or more citus tables> ` and this is the only place in the query referencing a citus table. Postgres' standard planner transforms the WHERE clause to: ` WHERE true ` So the query now has no citus tables, confusing the Citus planner as described in issues #7782 and #7783. The fix is to check, after Postgres standard planner, if the Query has been transformed as shown, and re-run the check of whether or not the query needs distributed planning.
colm-mchugh
added a commit
that referenced
this issue
Feb 26, 2025
DESCRIPTION: fix a planning error caused by a redundant WHERE clause (of the form WHERE true OR <expression>) Fix a Citus planning glitch, where the WHERE clause of the query is of the form: ` WHERE true OR <expression with 1 or more citus tables> ` and this is the only place in the query referencing a citus table. Postgres' standard planner transforms the WHERE clause to: ` WHERE true ` So the query now has no citus tables, confusing the Citus planner as described in issues #7782 and #7783. The fix is to check, after Postgres standard planner, if the Query has been transformed as shown, and re-run the check of whether or not the query needs distributed planning.
colm-mchugh
added a commit
that referenced
this issue
Feb 27, 2025
DESCRIPTION: fix a planning error caused by a redundant WHERE clause Fix a Citus planning glitch that occurs in a DML query when the WHERE clause of the query is of the form: ` WHERE true OR <expression with 1 or more citus tables> ` and this is the only place in the query referencing a citus table. Postgres' standard planner transforms the WHERE clause to: ` WHERE true ` So the query now has no citus tables, confusing the Citus planner as described in issues #7782 and #7783. The fix is to check, after Postgres standard planner, if the Query has been transformed as shown, and re-run the check of whether or not the query needs distributed planning.
Fixed by #7907 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to reproduce
Citus version:
Citus 12.1.6 on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
init State:
query:
result:
0 rows updated
Comparison
without
SELECT create_distributed_table('t3', 'c9');
(or without citus):result:
1 row updated
OR we can use the same WHERE clause:
result:
1 row returned
EXPLAIN
on the bug queryCustom Scan (Citus Adaptive) (cost=0.00..0.00 rows=0 width=0)
Task Count: 0
Tasks Shown: All
The text was updated successfully, but these errors were encountered: