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

pg_wal/.wal-g breaks pg_rewind #904

Open
thequailman opened this issue Mar 7, 2021 · 1 comment
Open

pg_wal/.wal-g breaks pg_rewind #904

thequailman opened this issue Mar 7, 2021 · 1 comment

Comments

@thequailman
Copy link

Hello, I'm running wal-g with PostgreSQL 13. When I run pg_rewind -R -D /var/lib/postgresql/13/main --source-server=postgresql://myserver/postgres --restore-target-wal with wal-g as the archive_command and restore_command, I get a fatal error from pg_rewind:

pg_rewind: servers diverged at WAL location 18C/35000000 on timeline 4
pg_rewind: rewinding from last common checkpoint at 18C/34000060 on timeline 4
pg_rewind: fatal: could not remove file "/var/lib/postgresql/13/main/pg_wal/.wal-g/prefetch/running/000000050000018C00000036": No such file or directory

This also has the fun side effect of breaking the underlying cluster (no pg_control) and creating a new timeline in wal-g.

This issue was reported on the PostgreSQL mailing list (https://www.postgresql-archive.org/Concurrency-issue-in-pg-rewind-td6154319.html) but I don't think it was ever resolved. Basically, wal-g shouldn't be creating folders under pg_wal was what the maintainers recommended? Could you make the .wal-g prefetch directory configurable?

x4m added a commit to x4m/wal-g that referenced this issue Mar 7, 2021
This will help to resolve issue wal-g#904
@x4m
Copy link
Collaborator

x4m commented Mar 7, 2021

Thanks for reminding me. I've totally forgotten about it...

x4m added a commit that referenced this issue Mar 26, 2021
This will help to resolve issue #904
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

2 participants