- pg_control file backup after all other files in backup
- pg_control file restore last in full restore
- rename pg_control to pg_control.pbk.bak at start of non-full restore
- remove pg_control.pbk.bak in the end of successfull non-full restore
- use pg_control.pbk.bak after failed non-full restore
- added tests for full and incremental restore
Tags: backup, catchup, restore
Looks like os.walk may yield dirs unsorted.
This way "check if directory already here as part of larger directory"
man mistakenly skip short 'base/1' as "part of" 'base/12699'
Got in some tests:
```
Traceback (most recent call last):
File "pg_probackup/tests/replica.py", line 625, in test_replica_stop_lsn_null_offset
gdb_checkpointer = self.gdb_attach(bgwriter_pid)
File "pg_probackup/tests/helpers/ptrack_helpers.py", line 1984, in gdb_attach
return GDBobj([str(pid)], self, attach=True)
File "pg_probackup/tests/helpers/ptrack_helpers.py", line 2054, in __init__
line = self.get_line()
File "pg_probackup/tests/helpers/ptrack_helpers.py", line 2065, in get_line
line = self.proc.stdout.readline()
File "/usr/lib/python3.10/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 189: invalid continuation byte
```
Fixed with `errors='replace'`
and BugTest.test_minrecpoint_on_replica as well
Tests were broken with introduction of "startness" handling in
9924ab014 [PBCKP-304] extended testgres.PosgresNode to ...
since tests uses os.kill directly.
* [PBCKP-259] fix for 'ERROR: Cannot create directory for older backup', rewrite --start_time implementation
* rewritten 5f2283c8de
* fixes for several tests
* disabled tests.merge.MergeTest.test_merge_backup_from_future and tests.restore.RestoreTest.test_restore_backup_from_future as incorrect for now
Co-authored-by: d.lepikhova <d.lepikhova@postgrespro.ru>
* Add a workflow to build and test probackup on Windows
* [PBCKP-149] fix test_basic_validate_nullified_heap_page_backup for windows
Co-authored-by: Alexey Savchkov <a.savchkov@postgrespro.ru>
Co-authored-by: Mikhail A. Kulagin <m.kulagin@postgrespro.ru>