Error message is translated according to current locale. So we can't
compare it as a string. But `abortedRecPtr` exists exactly for this case,
so we can rely on it.
Everything between WARNING and FATAL sections is now handled with the [\s\S]*? regex:
* [\s\S] is a group that handles any whitespace and non-whitespace character including new lines which are important in this case.
* "*" quantifier means zero or more characters. There may as well be nothing between these two sections.
* "?" quantifies in this case means greedy search so that we don't match more than we need.
to make two backups in one second we have to fail them.
Therefore we have to fetch backup_id from log in exception's message.
Retry for 20 seconds to have a chance to start in one second.
If we couldn't, lets skip the test.
zlib decompression could mark error either as "data error" or
"buffer error". One of check did consider it, other didn't.
Make them same.
And use `assertRaises` for good (requires python 3.2 at least)
Pg15 now reports if it didn't met expected contrecord. Absence of this
message was long standing bug in previous postgres versions.
This situation could happen if WAL segment was rewritten after restart.
It causes "tests.validate.ValidateTest.test_validate_wal_unreal_values"
to hang but (looks like) for other reason: test tries to read "in future".
Probably we should stop reading logs here. But since we always did
continue here, lets continue as well.
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.