Skip to content

Unable to restore a dropped table in DB when foreign keys are present. #693

@computeminionstest

Description

@computeminionstest

Hello,
My PosgreSQL + pgBackRest setup is as following:

  1. pgBackRest version: 2.08

  2. PostgreSQL version: 10.6

  3. Operating system/version - CentOS 7

  4. Did you install pgBackRest from source or from a package?
    Source

  5. pgBackRest Configuration:
    [global]
    repo-path=/home/TSDB_Backup_S3IA/deepr_historical_db_backup
    archive-async=y
    log-level-file=detail

[localhost]
pg1-path=/home/databases/timescaledb/10/data
retention-full=2

  1. postgresql.conf Settings:
    archive_mode = on
    archive_command = 'pgbackrest --stanza=localhost archive-push %p'
    listen_addresses = '*'
    max_wal_senders = 10
    wal_level = replica
    port = 5432
    shared_preload_libraries = 'timescaledb'

  2. Log file for pgbackrest is attached (called localhost-restore.log)

  3. Describe the issue:
    My DB contains a TimescaleDB extension. My DB host and Archive Repository are on the same host but in different locations. I am trying to recover a dropped table that was related to another table by foreign key constraints and was dropped by calling DROP.... CASCADE.
    After stopping the postgresql-10 server ,
    Recovery is run using recovery command
    pgbackrest --delta --stanza=localhost --log-level-console=detail restore
    But after recovery is complete, table is not present in the DB.
    However if I try to restore a table that has no foreign key constraints, it is successfully recovered after pgbackrest restore. But if the dropped table has foreign key constraint it is not recovered.
    I want to know what am I doing wrong or is it that pgbackrest is unable to recover dropped tables that have foreign key constraints.

localhost-restore.log

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions