-
Notifications
You must be signed in to change notification settings - Fork 200
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
barman backup <server> --wait
not working with Postgres 17
#1041
Comments
Hi, I've opened a draft PR with quick proof of concept fix that makes This most likely requires more work :-) and I am unsure if it is even the best approach. I see also that e.g. Line 1367 in ebffcd3
and whilst I guess it is much less likely to encounter a segment boundary here, if it is possible then this function will also need fixing. Thanks! |
Hello @cameronmurdoch , Thanks for reporting this and providing a POC with a solution. Upon seeing your PR #1044, I think you are in the right path. Would you like to contribute a PR to Barman? I can review it and give suggestions on the code and how to proceed. If not, we will take that task over within the development team. Best regards, |
Hi @andremagui Yes I can contribute a PR to Barman. Any thoughts on how to proceed? Thanks |
Hey @cameronmurdoch, great to have you onboard for this, thanks for the reply. We can proceed directly in your opened PR. I will post a review and you can start from there, sounds good? |
Hello @cameronmurdoch did you have a chance to look into this? Let us know if you need any help |
Hi
I set up two otherwise identical postgres servers with barman, once running pg16.6 and the other 17.2, using the following config (XX is the postgres major version):
Both postgres servers are idle. If I run
barman backup --wait
for the postgres 16 server, I get as expected:The backup started with walfile 000000010000000000000006 and ended with 000000010000000000000007, and barman receives and archives these as expected almost immediately.
If I do this for the pg17 server, I get this:
This hangs waiting for walfile 000000010000000000000007, and
barman.wal_archiver INFO: No xlog segments found from streaming for dbpg01.
is logged constantly in the logfile.If I manually run switch-wal then the backup completes.
I think this problem is caused by a breaking change in pg17 described in the release notes as:
Here is the commit:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=344afc776
I see that
pg_walfile_name_offset()
is used here:barman/barman/postgres.py
Line 738 in ebffcd3
And that
Backup end at LSN: 0/7000000 (000000010000000000000007, 00000000)
is at the segment boundary so for pg <= 16pg_walfile_name_offset()
would have given 000000010000000000000006 as the filename, but for pg17 we get 000000010000000000000007Thanks!
C
The text was updated successfully, but these errors were encountered: