uta
uta copied to clipboard
why I can not find table uta_20180821.meta ?(docker version)
$ sudo docker run --name uta_20180821 -v uta_20180821:/var/lib/postgresql/data -p 50827:5432 biocommons/uta:uta_20180821
$ psql -h localhost -p 50827 -U anonymous -d uta -c "select * from uta_20180821.meta" ERROR: relation "uta_20180821.meta" does not exist LINE 1: select * from uta_20180821.meta
why I can not find table uta_20180821.meta ?
docker show the below sentences: 2020-05-29 03:43:17.433 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 2020-05-29 03:43:17.433 UTC [1] LOG: listening on IPv6 address "::", port 5432 2020-05-29 03:43:17.435 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2020-05-29 03:43:17.450 UTC [24] LOG: database system was shut down at 2020-05-29 03:42:29 UTC 2020-05-29 03:43:17.456 UTC [1] LOG: database system is ready to accept connections 2020-05-29 03:43:33.051 UTC [31] ERROR: relation "uta_20180821.meta" does not exist at character 15 2020-05-29 03:43:33.051 UTC [31] STATEMENT: select * from uta_20180821.meta
If you're running a new container, the first operation is to download data and load into the postgresql instance. That takes about 3 minutes on my fast laptop with an SSD. While the data are loaded, postgresql is available but doesn't contain anything. I just ran the same commands and it worked fine.
Here's an abridged transcript:
$ docker volume rm uta_20180821
$ docker volume create uta_20180821
$ docker run --name uta_20180821 -v uta_20180821:/var/lib/postgresql/data -p 50827:5432 biocommons/uta:uta_20180821
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
...
[a bunch of text, including CREATE TABLE, COPY, ALTER TABLE, GRANT, and REFRESH MATERIALIZED VIEW commands]
...
=======================================================================
=======================================================================
==
== uta_20180821 installed from
== http://dl.biocommons.org/uta/uta_20180821.pgd.gz
==
...
2020-06-12 00:58:12.399 UTC [1] LOG: database system is ready to accept connections
I ran the psql command in another window.
The easiest explanation for what you see is that you didn't wait until data were loaded. If you don't see the uta_20180821 installed from
line, it's not ready.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.