1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-07-16 07:14:15 +02:00
Commit Graph

3548 Commits

Author SHA1 Message Date
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
19a7c5b01f tests: do not read whole file at once for digest. Iterate instead. 2022-11-25 07:59:14 +03:00
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
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
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
e674202eac test_backup_via_unprivileged_user - test with ptrack correctly 2022-11-24 14:42:12 +03:00
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
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
4c09debe6f Revert "PBCKP-306 add '_test' to tests files"
This reverts commit 2b8a153235.
2022-11-24 10:26:35 +01:00
2b8a153235 PBCKP-306 add '_test' to tests files 2022-11-24 10:23:59 +01:00
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
44fef8894e a bit more backup_id_of 2022-11-23 17:50:51 +03:00
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
20e12edc80 fix one of backup_id output. 2022-11-23 17:21:31 +03:00
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
eed28135b9 hotfix: cfs_restore.py decorated to postgres enterprise only 2022-11-23 13:47:26 +03:00
8f20e7eb58 Fixed link in README.md file [ci skip] 2022-11-17 18:50:17 +03:00
97f3e70edb asyncio.sleep -> time.sleep 2022-11-17 12:55:15 +03:00
4c823b3930 ... 2022-11-16 16:14:32 +03:00
516d325a11 Merge branch 'REL_2_5' into REL_2_5-PBCKP-304 2022-11-16 16:12:10 +03:00
858de550e8 Merge branch 'master' into REL_2_5 2022-11-16 16:02:48 +03:00
8c670f0f9b move test_basic_full_backup => test_full_backup
run it in separate travis action
+ add same test with stream replication
2.5.10
2022-11-16 13:43:20 +03:00
af4fb2e8c6 [PBCKP-304] moved _is_result_is_ok() into ProbackupTest class scope 2022-11-16 02:00:05 +03:00
f3f83b766a merge branch REL_2_5-PBCKP-336 into REL_2_5-PBCKP-304 2022-11-15 18:15:11 +03:00
e3189e425d [PBCKP-304] missed self.module_name & self.fname fixes 2022-11-15 17:56:40 +03:00
9924ab0142 [PBCKP-304] extended testgres.PosgresNode to filter excessive close() and its log entries calls 2022-11-15 17:45:28 +03:00
e2b4549887 Merge branch 'REL_2_5' into REL_2_5-PBCKP-304 2022-11-15 17:35:22 +03:00
5f66a60a81 Merge branch 'master' into REL_2_5 2022-11-15 15:03:55 +03:00
348283b307 update version to 2.5.10 2022-11-15 13:43:09 +03:00
de411ed393 Merge branch 'REL_2_5_correct_test_skip' into REL_2_5 2022-11-15 13:03:45 +03:00
457e06296c Merge branch 'REL_2_5' 2022-11-15 12:59:28 +03:00
b7bd831b8d correctly test skips 2022-11-15 11:32:15 +03:00
4505def249 properly skip ptrack tests. 2022-11-15 11:27:06 +03:00
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
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
d7cc00b358 Check pg_probackup binary in PATH 2022-11-10 01:02:29 +07:00
04e05b151d Fix auth_test.py 2022-11-09 12:17:10 +03:00
cda016c955 [PBCKP-304] removed ProbackupTest.clean_all() GC magic, simplified ProbackupTest.tearDown() 2022-11-09 03:44:47 +03:00
a2c1e6d6b4 [PBCKP-304] removed direct calls to ProbackupTest.del_test_dir() from tests 2022-11-09 02:50:36 +03:00
39e06f576b [PBCKP-304] test dirs cleanup fixed - added logic for nodes GC and dirs cleanup 2022-11-09 01:56:11 +03:00
9f3f530ec7 [PBCKP-304] extracted all cleanup routines to ptrack.py.TearDown() 2022-11-09 01:55:28 +03:00
b17669c969 [PBCKP-146] add test for "unchanged cfm is not backuped" 2.5.9 2022-11-03 11:51:40 +03:00
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
693bffe08d [PBCKP-146] fix cfm truncated crc calculation in delta/page backup
- On backup we should compare truncated crc with previous version.
- copying remote file didn't honor "don't truncate first 64 bytes" rule.
- crc calculation didn't honoer "don't truncate first 64 bytes" rule.
2022-11-03 11:50:30 +03:00
bc945994de [PBCKP-304] auto tests cleanup added to ptrack_helper.py 2022-11-03 07:04:34 +03:00
fc8b89079b [PBCKP-304] fix cfs_restore test 2022-11-03 07:04:34 +03:00
03f210b2be [PBCKP-304] cfs tests moved back to build 2022-11-03 07:04:34 +03:00
85708251bb fix for forkname detection in get_backup_filelist 2022-11-03 03:40:35 +03:00
a8ee334c3f [PBCKP-235] fix one test for <15.0 2022-11-03 03:40:35 +03:00
eaf3b14c22 fix set_forkname
Fork detection were broken before set_forkname extraction, and its bug
were copied into.

Lets reimplement it to be like `parse_filename_for_nonetemp_relation` in
PostgreSQL code.
2022-11-03 03:40:35 +03:00