Skip to content

Commit

Permalink
Fix error "External planner is not registered" (#1154)
Browse files Browse the repository at this point in the history
Problem description:
Tests for 'pg_stat_statements', launched with 'optimizer=on', failed with error:
"FATAL: External planner is not registered".

Root cause:
Setup and teardown steps of 'pg_stat_statements' configured values of
'shared_preload_libraries' without taking into account its previous value. Thus,
it was set to 'pg_stat_statements' at test start, and to empty string after the
tests. And 'orca' lib was lost. It caused the error.

Fix:
Now setup and teardown steps take into account previous value of
'shared_preload_libraries'.
  • Loading branch information
whitehawk authored Dec 12, 2024
1 parent a2a95d6 commit 7444a17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- start_ignore
\! gpconfig -r shared_preload_libraries;
\! gpconfig -c shared_preload_libraries -v "$(psql -At -c "SELECT array_to_string(array_remove(string_to_array(current_setting('shared_preload_libraries'), ','), 'pg_stat_statements'), ',')" postgres)"
\! gpstop -raq -M fast;
-- end_ignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- start_ignore
\! gpconfig -c shared_preload_libraries -v 'pg_stat_statements';
\! gpconfig -c shared_preload_libraries -v "$(psql -At -c "SELECT array_to_string(array_append(string_to_array(current_setting('shared_preload_libraries'), ','), 'pg_stat_statements'), ',')" postgres)"
\! gpstop -raq -M fast;
-- end_ignore

0 comments on commit 7444a17

Please sign in to comment.