Skip to content

Commit

Permalink
Reconnect after creating extension, to fix search_path race
Browse files Browse the repository at this point in the history
Closes GH-288
  • Loading branch information
strk committed Apr 8, 2022
1 parent 7401337 commit 6bb51dd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions initdb-postgis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ for DB in template_postgis "$POSTGRES_DB"; do
"${psql[@]}" --dbname="$DB" <<-'EOSQL'
CREATE EXTENSION IF NOT EXISTS postgis;
CREATE EXTENSION IF NOT EXISTS postgis_topology;
-- Reconnect to update pg_setting.resetval
-- See https://github.com/postgis/docker-postgis/issues/288
\c
CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;
CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;
EOSQL
Expand Down

0 comments on commit 6bb51dd

Please sign in to comment.