Skip to content

Error when restoring the official dump file in dev environment #117

@nicolas-heigvd

Description

@nicolas-heigvd

Hello,

I met an error during the database restore process:

api-db-1  | 2024-10-11 08:39:39.382 UTC [59] ERROR:  schema "topology" already exists
api-db-1  | 2024-10-11 08:39:39.382 UTC [59] STATEMENT:  CREATE SCHEMA topology;
api-db-1  | psql:/tmp/dump.sql:32: ERROR:  schema "topology" already exists

This is not not blocking but I think that the plain text dump as currently made is not ideal for several reasons.
Therefore, I'm wondering if we couldn't take advantage of a custom dump instead?

 12G oct 11 05:10 PostgreSQL.sql                 <---- the official dump
4.1G oct 10 12:49 20241010103350_smapshot.dump   <---- a dump I made

Because the plain text one not only is it really fat, but it also poses a few tricky problems:

  • it can't be accessed without being root on the server,
  • must be unpacked 2x manually with two additional tools (tar and gzip),
  • raises the error mentioned above during restore,
  • restore with psql is slow and inflexible; even PostgreSQL developers don't necessarily recommend doing it that way

Working on it....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions