Use PostgreSQL 9.3's `pg_isready` to wait for connectivity
The postgresql module has a postStart section that waits for a database to accept connections before continuing. However, this assumes various properties about the database - specifically the database user and (implicitly) the database name. This means that for old installations, this command fails because there is no 'postgres' user, and the service never starts. While 7deff39 does create the 'postgres' user, a better solution is to use `pg_isready`, who's sole purpose is to check if the database is accepting connections. This has no dependency on users, so should be more robust.
parent
7de29bd2
Please register or sign in to comment