Skip to content

Fail-fast setting for psql-client prevents automatic import on startup of full db dumps #362

@rgielen

Description

@rgielen

psql=( psql -v ON_ERROR_STOP=1 )

In this line psql is advised to fail fast on errors. This is a problem for importing any dump created by pg_dumpall, since there is a 99% chance it will include a CREATE ROLE postgres; statement, causing an error. In default mode psql keeps on executing the following statements, which is perfectly fine to restore a cluster.

My expectation would be that a pg_dumpall dump can be imported smoothly when mounted at /docker-entrypoint-initdb.d.

I suggest to remove the fail-on-error setting or at least make it configurable through an environment variable (IMHO with defaulting to standard psql behaviour)

Metadata

Metadata

Assignees

No one assigned

    Labels

    RequestRequest for image modification or featurequestionUsability question, not directly related to an error with the image

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions