INSERT INTO ... SELECT fails when auto_explain is configured with auto_explain.log_analyze = true.
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
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:
1. Configure auto_explain with analyze option tuned on.
2. 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.
Contributor guide
Assessment
This issue has not been assessed yet.