Skip to content
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

search_path is lacking topology #288

Closed
strk opened this issue Apr 7, 2022 · 6 comments · Fixed by #290
Closed

search_path is lacking topology #288

strk opened this issue Apr 7, 2022 · 6 comments · Fixed by #290

Comments

@strk
Copy link
Member

strk commented Apr 7, 2022

See https://gitlab.com/nibioopensource/pgtopo_update_rest/-/jobs/2305639540#L695
The search_path for the dockerized database is: "$user", public, tiger
This is for tag 13-3.2-alpine, I didn't test other tags

@strk
Copy link
Member Author

strk commented Apr 7, 2022

I've just tested that this is also the case for the 13-master tag:
https://gitlab.com/nibioopensource/pgtopo_update_rest/-/jobs/2305781533#L257

@strk
Copy link
Member Author

strk commented Apr 7, 2022

Both template_postgis and postgres databases have the missing topology schema, even with latest tag:

root@docker:~# docker exec -ti postgis-latest psql -U postgres -l
                                    List of databases
       Name       |  Owner   | Encoding |  Collate   |   Ctype    |   Access privileges   
------------------+----------+----------+------------+------------+-----------------------
 postgres         | postgres | UTF8     | en_US.utf8 | en_US.utf8 | 
 template0        | postgres | UTF8     | en_US.utf8 | en_US.utf8 | =c/postgres          +
                  |          |          |            |            | postgres=CTc/postgres
 template1        | postgres | UTF8     | en_US.utf8 | en_US.utf8 | =c/postgres          +
                  |          |          |            |            | postgres=CTc/postgres
 template_postgis | postgres | UTF8     | en_US.utf8 | en_US.utf8 | 
(4 rows)

root@docker:~# docker exec -ti postgis-latest psql -U postgres template_postgis
psql (13.5 (Debian 13.5-1.pgdg110+1))
Type "help" for help.

template_postgis=# show search_path;
      search_path       
------------------------
 "$user", public, tiger
(1 row)

template_postgis=# 
\q
root@docker:~# docker exec -ti postgis-latest psql -U postgres postgres
psql (13.5 (Debian 13.5-1.pgdg110+1))
Type "help" for help.

postgres=# show search_path;
      search_path       
------------------------
 "$user", public, tiger
(1 row)

@strk
Copy link
Member Author

strk commented Apr 7, 2022

I've created a new database from within the docker container to see what would have happened and surprise: installing tiger_geocoder removes the topology item:

test_issue288=# CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;
CREATE EXTENSION
test_issue288=# show search_path;              
        search_path        
---------------------------
 "$user", public, topology
(1 row)

test_issue288=# CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;
CREATE EXTENSION
test_issue288=# show search_path;              
      search_path       
------------------------
 "$user", public, tiger
(1 row)

@strk
Copy link
Member Author

strk commented Apr 7, 2022

Dropping and re-creating postgis_topology extension removes the tiger schema from search_path and adds the topology schema instead. They contend their name in the search_path, will need to be filed upstream.

@strk
Copy link
Member Author

strk commented Apr 7, 2022

NOTE: reconnecting to database after the creation of the first extension, before creating the next extension, fixes the problem

@strk
Copy link
Member Author

strk commented Apr 7, 2022

Upstream ticket: https://trac.osgeo.org/postgis/ticket/5125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant