1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-11-28 09:33:54 +02:00
Commit Graph

3505 Commits

Author SHA1 Message Date
Yura Sokolov
887fb82a2c Merge branch 'master' into REL_2_5 2022-11-29 11:56:40 +03:00
Yura Sokolov
15a5c5dad7 [PBCKP-354] Pg15: continue reading if error "missing contrecord" is met.
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.
2022-11-29 11:12:20 +03:00
Yura Sokolov
be949fd91e fix memory leak in config_get_opt 2022-11-25 16:23:56 +03:00
Viktoria Shepard
0e1227b29f Merge branch 'REL_2_5-PBCKP-306-test-report' into 'REL_2_5'
PBCKP-306 add '_test' to test files

See merge request eepbk/pg_probackup_ee!2
2022-11-25 12:57:44 +03:00
Viktoria Shepard
d049466287 PBCKP-306 add '_test' to test files 2022-11-25 12:57:43 +03:00
Yura Sokolov
440441dc6f ... fix names 2022-11-25 11:26:54 +03:00
Yura Sokolov
1617eb34ec tests: prettify pgdata_content and compare_pgdata 2022-11-25 11:03:52 +03:00
Yura Sokolov
20667e9594 tests: better directory collection in pgdata_content
There is no need to walk pgdata twice.
We could delete parent directories instead of skipping them.
2022-11-25 08:31:00 +03:00
Yura Sokolov
19a7c5b01f tests: do not read whole file at once for digest. Iterate instead. 2022-11-25 07:59:14 +03:00
Yura Sokolov
7eab6e3463 [PBCKP-358] sort directories to not skip 'base/1' because of 'base/12699'
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'
2022-11-25 07:58:08 +03:00
Yura Sokolov
b7a183081e [PBCKP-357] fix UnicodeDecodeError
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'`
2022-11-25 06:40:07 +03:00
Yura Sokolov
73cce507c2 [PBCKP-358] fix CatchupTest.test_unclean_(delta|ptrack)_catchup
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.
2022-11-25 04:20:29 +03:00
Yura Sokolov
e674202eac test_backup_via_unprivileged_user - test with ptrack correctly 2022-11-24 14:42:12 +03:00
Yura Sokolov
8488b289ba fix test_backup_via_unprivileged_user with ptrack enabled
It is garbage remained from old ptrack version support.
2022-11-24 14:23:45 +03:00
Yura Sokolov
08557855e2 fix error
During refactoring base36enc it were mistakenly changed from
current_backup->start_time to current_backup->parent_backup
2022-11-24 12:30:25 +03:00
v.shepard
4c09debe6f Revert "PBCKP-306 add '_test' to tests files"
This reverts commit 2b8a153235.
2022-11-24 10:26:35 +01:00
v.shepard
2b8a153235 PBCKP-306 add '_test' to tests files 2022-11-24 10:23:59 +01:00
Yura Sokolov
87dd3f2021 base36enc(backup->backup_id) -> backup_id_of(backup)
Here we assume backup_id == start_time.
It is really so at the moment, but could change in future.

Well, it almost always same. Sometime backup_id is set
while start_time is not set yet (backup creation). And
we had to fix places where start_time were changed without
change of backup_id.
2022-11-23 20:51:20 +03:00
Yura Sokolov
44fef8894e a bit more backup_id_of 2022-11-23 17:50:51 +03:00
Yura Sokolov
71f8ccf4cd replace base36enc(backup->start_time) with helper backup_id_of(backup)
Lazily store encoded backup_id in backup itself.
2022-11-23 17:21:31 +03:00
Yura Sokolov
20e12edc80 fix one of backup_id output. 2022-11-23 17:21:31 +03:00
Yura Sokolov
22e6c408fe base36enc: abuse C99 compound literals lifetime.
C99 introduced compound literals (`(char[14]){0}` - literal of array).
Compound literals have same lifetime as block local variable, ie till
the end of block. There for it is save to initiate several of them in
same block and assume they are all live.

This way we may rewrite base36enc into macros which uses compound
literal instead of static variable to extend its result lifetime.
2022-11-23 17:21:31 +03:00
Ivan Lazarev
eed28135b9 hotfix: cfs_restore.py decorated to postgres enterprise only 2022-11-23 13:47:26 +03:00
Victor Spirin
8f20e7eb58 Fixed link in README.md file [ci skip] 2022-11-17 18:50:17 +03:00
Yura Sokolov
97f3e70edb asyncio.sleep -> time.sleep 2022-11-17 12:55:15 +03:00
Yura Sokolov
4c823b3930 ... 2022-11-16 16:14:32 +03:00
Yura Sokolov
516d325a11 Merge branch 'REL_2_5' into REL_2_5-PBCKP-304 2022-11-16 16:12:10 +03:00
Yura Sokolov
858de550e8 Merge branch 'master' into REL_2_5 2022-11-16 16:02:48 +03:00
Yura Sokolov
8c670f0f9b move test_basic_full_backup => test_full_backup
run it in separate travis action
+ add same test with stream replication
2022-11-16 13:43:20 +03:00
Ivan Lazarev
af4fb2e8c6 [PBCKP-304] moved _is_result_is_ok() into ProbackupTest class scope 2022-11-16 02:00:05 +03:00
Ivan Lazarev
f3f83b766a merge branch REL_2_5-PBCKP-336 into REL_2_5-PBCKP-304 2022-11-15 18:15:11 +03:00
Ivan Lazarev
e3189e425d [PBCKP-304] missed self.module_name & self.fname fixes 2022-11-15 17:56:40 +03:00
Ivan Lazarev
9924ab0142 [PBCKP-304] extended testgres.PosgresNode to filter excessive close() and its log entries calls 2022-11-15 17:45:28 +03:00
Yura Sokolov
e2b4549887 Merge branch 'REL_2_5' into REL_2_5-PBCKP-304 2022-11-15 17:35:22 +03:00
Yura Sokolov
5f66a60a81 Merge branch 'master' into REL_2_5 2022-11-15 15:03:55 +03:00
Yura Sokolov
348283b307 update version to 2.5.10 2022-11-15 13:43:09 +03:00
Yura Sokolov
de411ed393 Merge branch 'REL_2_5_correct_test_skip' into REL_2_5 2022-11-15 13:03:45 +03:00
Yura Sokolov
457e06296c Merge branch 'REL_2_5' 2022-11-15 12:59:28 +03:00
Yura Sokolov
b7bd831b8d correctly test skips 2022-11-15 11:32:15 +03:00
Yura Sokolov
4505def249 properly skip ptrack tests. 2022-11-15 11:27:06 +03:00
Yura Sokolov
4869a564d0 [PBCKP-336] Fix segno calculation.
It were lost during fork-name detection fix at eaf3b14c22 .
And since there were no basic test for this, it were not detected.
2022-11-14 13:04:09 +03:00
asavchkov
7b62d11056
Merge pull request #564 from postgrespro/respect-path
Respect PATH in a  pg_probackup binary check
2022-11-10 17:46:52 +07:00
Alexey Savchkov
d7cc00b358 Check pg_probackup binary in PATH 2022-11-10 01:02:29 +07:00
Yura Sokolov
04e05b151d Fix auth_test.py 2022-11-09 12:17:10 +03:00
Ivan Lazarev
cda016c955 [PBCKP-304] removed ProbackupTest.clean_all() GC magic, simplified ProbackupTest.tearDown() 2022-11-09 03:44:47 +03:00
Ivan Lazarev
a2c1e6d6b4 [PBCKP-304] removed direct calls to ProbackupTest.del_test_dir() from tests 2022-11-09 02:50:36 +03:00
Ivan Lazarev
39e06f576b [PBCKP-304] test dirs cleanup fixed - added logic for nodes GC and dirs cleanup 2022-11-09 01:56:11 +03:00
Ivan Lazarev
9f3f530ec7 [PBCKP-304] extracted all cleanup routines to ptrack.py.TearDown() 2022-11-09 01:55:28 +03:00
Yura Sokolov
b17669c969 [PBCKP-146] add test for "unchanged cfm is not backuped" 2022-11-03 11:51:40 +03:00
Yura Sokolov
7cadc3378c [PBCKP-146] fix filesize filling
file->size were not filled while reading backup filelist.
That lead to excess non-data file backups.
2022-11-03 11:51:40 +03:00