-
Notifications
You must be signed in to change notification settings - Fork 193
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
--target-tli=current is not working as expected #922
Comments
Hi,
Right? I'm asking because if nothing happened between step 1 and 2 that generated a timeline change, then using the |
No, I tried this:
Or in other words: --target-tli=current and --target-tli=latest and no --target-tli parameter at all results in the same recovery. |
same thing for me |
Hello @JP95Git @rprovodenko ,
Thanks for clarifying the steps that were taken. Please note that between steps 1 and 3 you have never created a new timeline in Postgres. A new timeline in Postgres is not created when you take backups. A new timeline is created in Postgres whenever recovery ends, for example:
You mentioned that you achieved the same outcomes in these 3 scenarios:
Based on your steps, that is expected because the Postgres timeline was the same in both backups that you took. That way, Note: For further information about Postgres timelines and If you want to recover from a backup and want to stop replaying WALs before your table was created, we recommend using |
I think you are right. In my machines the timeline increases only after recovery. Actually this was a workaround because PITR does not work for me and other people, as you can see here: #881 So you can close this issue. But please fix #881, as there was no process since 6 month and my customer demands some full testing of database recovery soon. |
Hi,
I am using PostgreSQL 16.1 and Barman 3.10. Backup works fine, but PITR does not work very well, as described here: #881
So I tried to use a different approach to set the recovery time and found this in the manual:
https://docs.pgbarman.org/release/3.10.0/
So I had a bunch of backups, created with
/path/to/barman --config /path/to/barman.conf backup --wait localhost
I created some tables for testing and created another backup. My idea was to restore the previous backup to get the database without the recently created tables.
/path/to/barman --config /path/to/barman.conf recover localhost 20240410T162031 /path/to/database
Restore worked, I started PostgreSQL and the tables were still there, OK.
/path/to/barman --config /path/to/barman.conf recover localhost 20240410T162031 /path/to/database --target-tli=current
Restore worked again, I started PostgreSQL and the tables were still there. I expected to get a database without the tables, because the tables did no exists when the backup was created. I created the tables AFTER the backup.
This issue also works with Barman 3.9.
The text was updated successfully, but these errors were encountered: