Yura Sokolov
17badb0c26
Revert "PBCKP-415 use pio for catalog_get_backup_list"
...
This reverts commit f0215bbcc4 .
2022-12-18 21:32:44 +03:00
Yura Sokolov
e79e5f0728
[PBCKP-416] pioOpenDir + pioDirNext
...
Looks like pioListDir were no so great idea. Step to return to iterator
style.
2022-12-18 21:32:44 +03:00
Yura Sokolov
abdfdd2777
ft_strbuf_cat_path
2022-12-18 21:32:21 +03:00
Yura Sokolov
d2843d0a11
fix for fio_receive_pio_err
2022-12-18 21:32:15 +03:00
Yura Sokolov
5341b9d0a7
remove pioAsyncWrite/pioAsyncError
2022-12-18 21:32:04 +03:00
Yura Sokolov
133c2275d5
fix cleanup_tablespace: it is for DB, not for BACKUP
2022-12-18 16:39:32 +03:00
Yura Sokolov
04c3159edf
ft_utils: more useful staff.
2022-12-18 16:39:32 +03:00
Yura Sokolov
6bfdc0b024
adapt fobj missing argument compile-time error generation
...
And it actually found error in data.c.
2022-12-18 01:33:58 +03:00
Yura Sokolov
bce53bbd31
fu_util/fobj: make missing argument compilation error
2022-12-18 01:33:38 +03:00
Yura Sokolov
33f7c10d2d
fix clang warning about format(gnu_printf)
2022-12-18 01:33:38 +03:00
Yura Sokolov
d0d06f3e91
fix ft_strbuf_ensure for zero-initialized ft_strbuf_t
2022-12-18 01:32:08 +03:00
Yura Sokolov
47de7fea75
ft_util: easier to parse and compose from C structs
...
FT_BYTES_FOR - bytes buffer for variable
ft_bytes_dup - alloc copy of bytes
ft_bytes_shift_to/shift_must - cut to bytes from the beginning.
2022-12-18 01:31:56 +03:00
Yura Sokolov
2b274c7a6a
move pioRename from pioDrive to pioDBDrive
...
it has single invocation in archive.c to move "<WAL>.ready" to "<WAL>.done"
on database host.
2022-12-17 19:47:45 +03:00
Yura Sokolov
0852bf9abe
[PBCKP-417] move sync paramter from pioClose to pioOpenWrite/Rewrite
...
pioClose was not so comfortable place for. We always know at the file
opening will it be sync or not.
2022-12-17 02:21:37 +03:00
Yura Sokolov
eaead56049
use ft_strbuf_catc_zt + ft_bytes_shift_zt
2022-12-17 01:34:17 +03:00
Yura Sokolov
61c4d90316
ft_strbuf_cat_zt and ft_bytes_shift_str to easier remote operations
2022-12-17 01:28:19 +03:00
Yura Sokolov
81e2f7fe75
[PBCKP-416] do_catchup calls db_list_dir with backup_logs = false.
2022-12-16 23:22:14 +03:00
Sergey Fukanchik and Yuriy Sokolov
f0215bbcc4
PBCKP-415 use pio for catalog_get_backup_list
2022-12-16 16:26:08 +00:00
Yura Sokolov
68113e38d8
fu_utils: add test for correct thread termination
2022-12-16 02:20:49 +03:00
Yura Sokolov
f8fbbbbed3
...
2022-12-16 01:57:41 +03:00
Yura Sokolov
47e21044c8
Merge branch 'REL_2_5' into REL_2_6
2022-12-15 22:52:12 +03:00
Yura Sokolov
764680e23f
Merge branch 'REL_2_5'
2.5.11
2022-12-15 22:47:46 +03:00
Sergey Fukanchik
4b46382014
fix error message in merge_test
2022-12-15 19:31:12 +03:00
Yura Sokolov
b84bed3ecb
fix Makefile
2022-12-15 19:01:03 +03:00
Yura Sokolov
dcf90d689c
merge.c: unused buffer
2022-12-15 18:59:16 +03:00
Yura Sokolov
401bccf0b7
fu_util/fobj: fix autorelease pool cleanup in glibc
...
glibc's pthread_exit runs stack unwinding for C++ destructor's handling,
and calls destructors for pthread specifics only after unwinding.
This way fobj_destroy_thread_AR is called too lately.
We have to compile with '-fexception' to register all our
attribute((cleanup)) for autorelease pools as "C++ desctructors".
Found in debug session with Sergey Fucanchik <s.fukanchik@postgrespro.ru >
2022-12-15 18:57:40 +03:00
e.garbuz
bbe41a403d
Fix tests test_restore_from_fullbackup_to_new_location and test_restore_from_fullbackup_to_new_location_5_jobs
2022-12-15 13:37:15 +03:00
Yura Sokolov
8efe4d4bc7
remove fio fd-style functions and gzFile-style functions as unused
2022-12-15 11:13:15 +03:00
Yura Sokolov
692f0c0e7b
SimpleXlogPageRead: replace fileExists with pioExists
2022-12-15 11:02:01 +03:00
Yura Sokolov
d231fc6be5
fix pioReadFilter_pioRead
...
1. without this change it attempt to another one pioRead on wrapped even if
we already filled wbuf.
2. this lead to strange decompression error in SimpleXlogPageRead. I didn't
investigate it properly, but this change fixes things.
2022-12-15 11:02:01 +03:00
Yura Sokolov
d175255933
use pioOpenRead and pioWrapForReSeek in SimpleXlogPageRead
2022-12-15 11:02:01 +03:00
Yura Sokolov
fdab5a9149
prepare to replace fio in parsexlog.c: seekable decompressor
...
Seekable decompressor is a cheat: read from underlying file starts from
beginning if we seek backward.
But it is best we can do as gzseek does the same.
2022-12-15 10:33:11 +03:00
Yura Sokolov
d3ad1f4318
remove a lot of unused fio functions
2022-12-15 07:33:34 +03:00
Yura Sokolov
fdda848511
[PBCKP-404] use pioCopy instead of restore_non_data_file_internal
2022-12-15 07:04:12 +03:00
Yura Sokolov
ad178a80d0
[PBCKP-404] use pioReader in restore_data_file and validate_file_pages
...
reorganize common code in those functions into backup_page_iterator.
2022-12-15 07:04:12 +03:00
Yura Sokolov
36335b6047
remove pioReadFull
...
looks like all pioRead methods already tries to read all possible data
2022-12-15 05:45:34 +03:00
Yura Sokolov
f8286da568
[PBCKP-404] use pioDBWriter for restore_data_file/restore_non_data_file
2022-12-15 03:46:41 +03:00
Yura Sokolov
482c5d9933
fix pioTruncate/pioSeek signature: it is better to accept uint64_t
2022-12-15 01:01:40 +03:00
s.fukanchik and Yuriy Sokolov
4f153eb70f
PBCKP-403 use pio in write_page_headers
2022-12-14 23:39:18 +03:00
Alexander Burtsev and GitHub
640e7a5dcd
Update README.md
2022-12-14 17:42:15 +03:00
Yura Sokolov
f3a5de561a
merge_test: duplicate fio_remove breakpoints to pioRemove__do
2022-12-14 16:13:25 +03:00
Alexander Burtsev and GitHub
30e3e37c7b
Update README.md
2022-12-14 16:09:53 +03:00
Yura Sokolov
3f18ffab8b
fix pioWriteCompressed
2022-12-14 15:59:22 +03:00
Yura Sokolov
fceeb0abf2
Merge branch 'REL_2_5' into REL_2_6
2022-12-14 11:12:37 +03:00
Yura Sokolov
1f773d6d54
change pioWrite signature since it always return error on short write
...
and we don't use short write in any meaningful way.
2022-12-14 11:09:33 +03:00
Yura Sokolov
42ef001b9d
add pioWriteCompressed to pioDBWriter
2022-12-14 10:55:42 +03:00
Yura Sokolov
7fa6986306
[PBCKP-395] split pioOpen to pioOpenRead and pioOpenStream
...
it simplifies pioCopy as well
2022-12-14 09:59:46 +03:00
Yura Sokolov
ddb0d3329d
[PBCKP-395] force async erorr fetching in pioRemoteWriteFile_pioClose
2022-12-14 09:26:01 +03:00
Yura Sokolov
36e52ff9ab
fix for pioLocalFileWriter
2022-12-14 09:19:09 +03:00
Yura Sokolov
e25f8ab1cc
[PBCKP-395] intermediate step: forbid writting on pgFile
...
All write activity is moved to pioOpenWrite and pioOpenRewrite.
pgFile will be renamed to pgReader and pgReadStream.
2022-12-14 08:59:28 +03:00