-
Notifications
You must be signed in to change notification settings - Fork 670
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
Crash in auto_explain with recursive plans #2920
Comments
I tried running multi_check when auto_explain is loaded. It seems to crash for tests with recursive planning with a backtrace like:
|
We'd love to see Citus support |
fixed. it is auto_explain's bug, but will occured under customscan node, citus is only a special case. after portalrun, postgresql will pop all snapshot it pushed. so auto_explain need to manage snapshot itself. |
Has this fix been raised or proposed upstream at all? We'd love to see this fixed in the upstream. |
Easy way to repro on Citus: LOAD 'auto_explain';
CREATE TABLE test(a int);
SELECT create_distributed_table('test', 'a');
INSERT INTO test SELECT i FROM generate_series(0,1000000)i;
set auto_explain.log_min_duration to 0;
WITH cte_1 AS (SELECT * FROM test LIMIT 1) SELECT count(*) FROM cte_1;
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
The connection to the server was lost. Attempting reset: Failed.
Time: 48.723 ms
@:-!>
|
…tension. The crash happens with recursively planned queries. For such queries, subplans are explained via the ExplainOnePlan function of postgresql. This function reconstructs the query description from the plan therefore it expects the ActiveSnaphot for the query be available. This fix makes sure that the snapshot is in the stack before calling ExplainOnePlan. Fixes #2920.
…tension. The crash happens with recursively planned queries. For such queries, subplans are explained via the ExplainOnePlan function of postgresql. This function reconstructs the query description from the plan therefore it expects the ActiveSnaphot for the query be available. This fix makes sure that the snapshot is in the stack before calling ExplainOnePlan. Fixes #2920.
…ursive queries (#6406) This crash happens with recursively planned queries. For such queries, subplans are explained via the ExplainOnePlan function of postgresql. This function reconstructs the query description from the plan therefore it expects the ActiveSnaphot for the query be available. This fix makes sure that the snapshot is in the stack before calling ExplainOnePlan. Fixes #2920.
Could be related #2009
The text was updated successfully, but these errors were encountered: