Skip to content

[BUG] If the used postgresql server has more than 3 databases docker-entrypoint.sh hangs #610

@nipatiitti

Description

@nipatiitti

Tag/version of Container Images
0.4.5

If the postgresql server has more than 3 databases postgresql will output --More-- at the end of \l command.

In the loop of wait_for_postgres in docker-entrypoint.sh

until psql $DATABASE_URL -c '\l'; do
	>&2 echo "Postgres is unavailable - sleeping"
	sleep 1
done

the psql $DATABASE_URL -c '\l' hangs because it's waiting for someone to press space and for --More-- to continue and the connection to end.

Fixes:

Monkeypatch version:
Create .psqlrc file with \pset pager off in it and mount it to /root/.psqlrc

Proper fix:
Add psql -P pager=off ... to the until line of the loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions