Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kedare opened this issue May 13, 2022 · 0 comments
Open

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

kedare opened this issue May 13, 2022 · 0 comments

Comments

@kedare
Copy link

kedare commented May 13, 2022

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant