INSERT INTO ... SELECT fails when auto_explain is configured with auto_explain.log_analyze = true.
Regression runs surfaced that with the following auto_explain configuration, INSERT INTO ... SELECT commands fail.
shared_preload_libraries = 'citus,pg_stat_statements,auto_explain' auto_explain.log_min_duration = 0 // Setting this to 0 logs all plans.-1 (the default) disables logging of plans auto_explain.log_analyze = true
Repro steps:
-
Configure auto_explain with analyze option tuned on.
-
Run an INSERT INTO ... SELECT query. E.g:
CREATE TABLE source_table(a int); SELECT create_distributed_table('source_table', 'a'); INSERT INTO source_table SELECT * FROM generate_series(1, 10);
Expected: source_table should have 10 rows. Observed :
INSERT INTO source_table SELECT * FROM generate_series(1, 10); ERROR: EXPLAIN ANALYZE is currently not supported for INSERT ... SELECT commands via coordinator select count(*) from source_table; count ------- 0 (1 row)
This query should still work even though the explain analyze fails silently.
Okay, I think we can skip implementing this for now, because it seems like a new feature development (e.g., support EXPLAIN ANALYZE for INSERT .. SELECT via coordinator)