'Postgres query hanging when using a docker postgresql-client
I'm trying to execute postgres queries using the jbergknoff/postgresql-client docker image.
To do so, I launched the following commands:
docker pull jbergknoff/postgresql-client
docker run --rm -it jbergknoff/postgresql-client postgresql://dbuser:mypassword@host:5432/mydb
I was successfully connected to the database and got a prompt mydb=>.
I executed my first query: SELECT * FROM table LIMIT 1; and got results.
Then I performed a second test query with inscreasing the LIMIT clause in the query (> 3), for example SELECT * FROM table LIMIT 10;. But this time the query was hanging forever.
Additional infos :
- I have tested the same queries with pgAdmin and psql client (not docker) and got results.
- I have tested the queries from inside other docker containers (which have psql client installed) and the second query keeps hanging. So the problem isn't only related to jbergknoff/postgresql-client image in particular but related to docker in general.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
