-
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 with distributed table #7783
Comments
Thanks for your confirming. I wonder if #7696 #7697 #7698 can be reproduced in your computer, and they seem still exist with 12.1.6. Are they independent bugs caused by different logical defects? |
We have reproduced #7696, #7697 and #7698, it looks like they may be symptoms of the same underlying problem (to be confirmed), and this looks unrelated to this issue (#7783), but we need to investigate further and confirm. |
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.
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.
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.
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.
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.
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 |
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 deleted
Excepted result:
the WHERE clause is : WHERE TRUE or ……, so the correct result should be:
1 rows deleted
.Comparison and
EXPLAIN
result:when without citus, the query returns correctly:
1 rows deleted
.EXPLAIN result:
The text was updated successfully, but these errors were encountered: