Skip to content

Not so idempotent behaivior of sequential pg_probakcup executions #219

Closed
@alexign

Description

@alexign

Hello !
I have some strange behavior of sequential pg_probackup executions.

postgres@server:~/backup-tools# ls /backup/postgresql/backup/wal/ | grep exampledb
exampledb
postgres@server:~/backup-tools# ls /backup/postgresql/backup/backups/exampledb
ls: cannot access '/backup/postgresql/backup/backups/exampledb': No such file or directory
postgres@server:~/backup-tools# pg_probackup-11  add-instance -B /backup/postgresql/backup -D /data/postgresql --instance exampledb --remote-host postgres.example.com --remote-user postgres
ERROR: arclog_path '/backup/postgresql/backup/wal/exampledb' already exists
postgres@server:~/backup-tools# ls /backup/postgresql/backup/backups/exampledb
postgres@server:~/backup-tools# 
postgres@server:~/backup-tools# pg_probackup-11  add-instance -B /backup/postgresql/backup -D /data/postgresql --instance exampledb --remote-host postgres.example.com --remote-user postgres
ERROR: instance '/backup/postgresql/backup/backups/exampledb' already exists

So I think this behavior is not idempotent. When we try to execute pg_probackup several times one after another pg_probackup not only raises different error messages but also create inventory in broken state.
I think that before making any changes to file system pg_probackup should validate all conditions that possibly can prevent to create instance inventory successfuly.
Thank you in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions