Add --if-exists to pg_dump command-line in backup creation
Because we use the --clean argument to `pg_dump`, the database backup SQL file has many DROP commands that precede the section to restore the tables and data. However, on instances with an empty database, these DROP statements generate a lot of noise and make it difficult to filter true error messages from noise. In preparation of capturing error messages from stderr, we add this to the backup commands to make it easier to flag real errors. Reference: https://www.postgresql.org/docs/11/app-pgdump.html Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/36405
Showing
Please register or sign in to comment