Skip to content

Cannot restore using a backup-id directly without the WALs ? #431

Description

@sysblade

Hello :)

I was developing some tooling to restore the wal-e backup without having to install wal-e, and an issue after finishing the restore.
The restore itself would work fine, the database would start fine, but some tables would be unreadable, for example running a vacuum analyze on the whole database would cause the following error :

2022-05-13 13:33:20.038 UTC [19465] postgres@production STATEMENT:  SELECT anonymize_database(false);
2022-05-13 13:33:23.797 UTC [19465] postgres@production LOG:  request to flush past end of generated WAL; request 6A4/3A579D98, currpos 6A4/3A0380B0
2022-05-13 13:33:23.797 UTC [19465] postgres@production CONTEXT:  writing block 5339 of relation base/16387/546689
2022-05-13 13:33:23.797 UTC [19465] postgres@production STATEMENT:  ANALYZE VERBOSE;
2022-05-13 13:33:23.798 UTC [19465] postgres@production ERROR:  xlog flush request 6A4/3A579D98 is not satisfied --- flushed only to 6A4/3A0380B0
2022-05-13 13:33:23.798 UTC [19465] postgres@production CONTEXT:  writing block 5339 of relation base/16387/546689
2022-05-13 13:33:23.798 UTC [19465] postgres@production STATEMENT:  ANALYZE VERBOSE;

I first though my tool had an issue, so I reproducing the same issue with wal-e calls directly, it happens when I give a backup it instead of LATEST or providing a timestamp

This is the call I have used to reproduce the same issue with wal-e :

WABS_ACCESS_KEY="xxxx" WABS_ACCOUNT_NAME=xxxx WALE_WABS_PREFIX=wabs://proddb/dbk8s wal-e -a xxxx backup-fetch -p 8 /var/lib/replika/data/10 base_00000066000006A1000000D6_00000080

However it's working fine when specifying LATEST or a timestamp.

Another detail: This worked perfectly fine with "small" 200GB database, but not on a 900GB database

It's not clear why it's not working when only fetching the full backup ? What should be done more to make it useable without having to fetch the WALs ?

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