Postgres just stopped working

Credit card failed, and soon after our django/postgres setup just stopped working:

Error: Database is uninitialized and superuser password is not specified.
   You must specify POSTGRES_PASSWORD for the superuser. Use
   "-e POSTGRES_PASSWORD=password" to set it in "docker run".

   You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections
   without a password. This is *not* recommended. See PostgreSQL
   documentation about "trust":
 Exited with code 1

However, it looks like our account still has credits on the free tier. Is there a way to confirm this isn’t an account issue before I go debug?

I can assure you that the error is not related to your account issue because the error attributes to the official PostgreSQL docker image’s update.

The error message comes from .

To resolve it, you need to set POSTGRES_PASSWORD as the message says.

For further details, see

Having the same issue.

Just change the PostgreSQL image to a more specific version, not the latest. E.g. changing from 9.5 to 9.5.18 fixed the problem for us.

Probably a mistake when building the latest images.

So no, it’s neither an account issue nor a problem on your end.

1 Like

Looks like there is breaking change in Postgres docker image.

The fix is to either set a password with POSTGRES_PASSWORD=<password> or allow no password explicitly with POSTGRES_HOST_AUTH_METHOD=trust. Can set these environment variables in CircleCI

1 Like


This appears to have been caused by a breaking change in the official Postgres docker image:

If you wish to use the latest versions of the Postgres docker image (or CircleCI convenience image), there is a workaround shared on the issue thread here:

Alternatively, you can pin the Docker image to an earlier version. To do this, find the last successful job follow the steps in this support article: Pinning a Docker image to a specific version

For further discussion about this issue, I would suggest reaching out to the Postgres image maintainers on this GitHub issues thread:

Pawan Bahuguna

1 Like

Posted more on this here.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.