Skip to content

Fix for upcoming postgresql-15 compatibility #409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 73 commits into from
Closed
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
5cd672d
[Issue #224] New flag '--color' for coloring the show plain backup in…
gsmolk Jul 7, 2020
63b7909
Merge branch 'master' into release_2_5
gsmolk Jul 7, 2020
26578ed
bump version to 2.5.0
gsmolk Jul 7, 2020
3836509
[Issue #224] enable the stdout and stderr coloring by default
gsmolk Jul 7, 2020
f1b30e5
Merge branch 'master' into release_2_5
gsmolk Nov 11, 2020
98bb4fc
Merge branch 'master' into release_2_5
gsmolk Nov 12, 2020
75c8a8f
Merge branch 'master' into release_2_5
gsmolk Nov 12, 2020
5bf17cc
Merge branch 'master' into release_2_5
Dec 9, 2020
3f09845
remove backup_subcmd global variable and useless command_name variable
kulaginm Dec 29, 2020
00be188
Merge commit 'refs/pull/291/head' of https://github.com/postgrespro/p…
gsmolk Dec 29, 2020
a5ec1be
Merge branch 'master' into refs/pull/291/head
gsmolk Dec 29, 2020
dceed02
Merge branch 'master' into release_2_5
gsmolk Dec 29, 2020
8aea21d
add version and help help pages
kulaginm Dec 30, 2020
7383ddd
add some comments
gsmolk Jan 6, 2021
e2bbd4f
Merge pull request #291 from kulaginm/cmdline-refactor
gsmolk Jan 11, 2021
6e20f55
Merge branch 'refs/pull/291/head' into release_2_5
gsmolk Jan 11, 2021
0fdcc73
Merge branch 'master' into release_2_5
alubennikova Jan 22, 2021
1d50157
calm down compiler warning
alubennikova Jan 22, 2021
40aeb8b
fix merge conflict
alubennikova Jan 22, 2021
fc1bef8
Merge branch 'master' into release_2_5
gsmolk Jan 27, 2021
2ae2908
Code cleanup. Remove unused functions
alubennikova Feb 2, 2021
0fd2fde
Code cleanup. Remove unused pgBackupGetPath() function
alubennikova Feb 2, 2021
f26c959
remove unneeded funtion dir_read_file_list()
alubennikova Feb 2, 2021
94d4236
Merge branch 'master' into release_2_5
alubennikova Feb 2, 2021
da2c49d
code cleanup
alubennikova Feb 2, 2021
c1e81ed
Code cleanup. Start removing global variables in pg_probackup.c
alubennikova Feb 3, 2021
24a7a08
Code cleanup. Pass backup_catalog_path explicitly to functions that n…
alubennikova Feb 3, 2021
7ef802d
Add a comment declaring code refactoring plan
alubennikova Feb 3, 2021
2284c2b
Refactoring. Introduce catalogState structure. Update code in init.c
alubennikova Feb 3, 2021
48b8f60
Refactoring. Introduce instanceState structure. Update code in init.c
alubennikova Feb 3, 2021
3d62e2a
Refactoting. Move new state definitions to a separate header
alubennikova Feb 3, 2021
cc58553
Refactoring. Cleanup comments
alubennikova Feb 3, 2021
dbf5233
Refactoring. Use instanceState instead of global variable instance_name
alubennikova Feb 3, 2021
341d7b8
Refactoring. Get rid of global variable instance_name
alubennikova Feb 3, 2021
b956feb
Refactoring. Get rid of global variable backup_path
alubennikova Feb 3, 2021
9940967
Refactoring. Get rid of global variable backup_instance_path
alubennikova Feb 3, 2021
d9b3fb2
Refactoring. Get rid of global variable archlog_path
alubennikova Feb 3, 2021
6c52147
Refactoring. Get rid of global variable backup_instance_path (2)
alubennikova Feb 3, 2021
f897931
Refactoring. Remove redundand fields from InstanceConfig
alubennikova Feb 3, 2021
736b9c2
Refactoring. Fixes of previous changes
alubennikova Feb 4, 2021
23b5ea5
Merge branch 'master' into release_2_5
alubennikova Feb 4, 2021
e268421
Merge branch 'master' into release_2_5
gsmolk Feb 14, 2021
cf08885
Merge branch 'master' into release_2_5
gsmolk May 15, 2021
0e4b3a9
[Issue #385] pg_stop_backup refactoring, part 1
gsmolk May 18, 2021
d8050e5
[Issue #385] improve test coverage
gsmolk May 18, 2021
ac2e7cc
PGPRO-5018: Passing prev_backup_start_lsn (also known as horizonLsn) …
kulaginm May 24, 2021
ab85396
Merge branch 'master' into release_2_5
gsmolk May 26, 2021
991917e
Merge pull request #386 from postgrespro/release_2_5-pgpro-5018
gsmolk May 26, 2021
3c66873
[PR #386] fix
gsmolk May 26, 2021
151d499
[PR #386] test coverage
gsmolk May 26, 2021
3013a78
Release 2 5 pg stop backup decomposition2 (#387)
kulaginm May 27, 2021
6bdd241
Merge branch 'master' into release_2_5
gsmolk Jun 3, 2021
02ca67d
Merge branch 'master' into release_2_5
gsmolk Jun 12, 2021
13a1821
Merge branch 'master' into release_2_5
gsmolk Jun 14, 2021
da2cbcb
[Issue #394] fio_close is now synchronous
gsmolk Jun 14, 2021
97b23c4
Merge branch 'master' into release_2_5
gsmolk Jun 16, 2021
cce59bc
Remove ptrack-1.* support (#398)
kulaginm Jun 17, 2021
c8c7436
Merge branch 'master' into release_2_5
gsmolk Jun 17, 2021
4c27a93
tests: minor fix in ptrack.py
gsmolk Jun 17, 2021
5f54e62
travis: start sshd in container
gsmolk Jun 17, 2021
88bea54
travis: move to python3
gsmolk Jun 17, 2021
365c959
travis: some more fixes
gsmolk Jun 17, 2021
45b7816
Merge branch 'master' into release_2_5
gsmolk Jun 17, 2021
dbbfee4
tests: disable ptrack testing for PG < 11
gsmolk Jun 17, 2021
11e1240
Merge branch 'master' into release_2_5
gsmolk Jun 17, 2021
7ca590c
tests: drop ptrack1 suppport
gsmolk Jun 18, 2021
148afb2
Merge branch 'master' into release_2_5
gsmolk Jun 18, 2021
d55838e
fix test restore.RestoreTest.test_missing_database_map for PGPROEE11 …
kulaginm Jun 18, 2021
ad4fc96
fix segfault in get_index_list
gsmolk Jun 18, 2021
b13d3b8
Merge branch 'master' into release_2_5
gsmolk Jun 20, 2021
7de7284
Catchup command implementation (#392)
kulaginm Jun 21, 2021
07127b8
[Issue #400] some leftovers
gsmolk Jun 21, 2021
aebf319
Add compatibility with postgres master (upcoming PG-15).
kulaginm Jul 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ OBJS = src/utils/configuration.o src/utils/json.o src/utils/logger.o \
OBJS += src/archive.o src/backup.o src/catalog.o src/checkdb.o src/configure.o src/data.o \
src/delete.o src/dir.o src/fetch.o src/help.o src/init.o src/merge.o \
src/parsexlog.o src/ptrack.o src/pg_probackup.o src/restore.o src/show.o src/stream.o \
src/util.o src/validate.o src/datapagemap.o
src/util.o src/validate.o src/datapagemap.o src/catchup.o

# borrowed files
OBJS += src/pg_crc.o src/receivelog.o src/streamutil.o \
324 changes: 292 additions & 32 deletions doc/pgprobackup.xml

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions src/archive.c
Original file line number Diff line number Diff line change
@@ -113,7 +113,7 @@ static parray *setup_push_filelist(const char *archive_status_dir,
* Where archlog_path is $BACKUP_PATH/wal/instance_name
*/
void
do_archive_push(InstanceConfig *instance, char *wal_file_path,
do_archive_push(InstanceState *instanceState, InstanceConfig *instance, char *wal_file_path,
char *wal_file_name, int batch_size, bool overwrite,
bool no_sync, bool no_ready_rename)
{
@@ -148,15 +148,15 @@ do_archive_push(InstanceConfig *instance, char *wal_file_path,
elog(ERROR, "getcwd() error");

/* verify that archive-push --instance parameter is valid */
system_id = get_system_identifier(current_dir);
system_id = get_system_identifier(current_dir, FIO_DB_HOST);

if (instance->pgdata == NULL)
elog(ERROR, "Cannot read pg_probackup.conf for this instance");

if (system_id != instance->system_identifier)
elog(ERROR, "Refuse to push WAL segment %s into archive. Instance parameters mismatch."
"Instance '%s' should have SYSTEM_ID = " UINT64_FORMAT " instead of " UINT64_FORMAT,
wal_file_name, instance->name, instance->system_identifier, system_id);
wal_file_name, instanceState->instance_name, instance->system_identifier, system_id);

if (instance->compress_alg == PGLZ_COMPRESS)
elog(ERROR, "Cannot use pglz for WAL compression");
@@ -165,7 +165,7 @@ do_archive_push(InstanceConfig *instance, char *wal_file_path,
join_path_components(archive_status_dir, pg_xlog_dir, "archive_status");

/* Create 'archlog_path' directory. Do nothing if it already exists. */
//fio_mkdir(instance->arclog_path, DIR_PERMISSION, FIO_BACKUP_HOST);
//fio_mkdir(instanceState->instance_wal_subdir_path, DIR_PERMISSION, FIO_BACKUP_HOST);

#ifdef HAVE_LIBZ
if (instance->compress_alg == ZLIB_COMPRESS)
@@ -206,7 +206,7 @@ do_archive_push(InstanceConfig *instance, char *wal_file_path,
WALSegno *xlogfile = (WALSegno *) parray_get(batch_files, i);

rc = push_file(xlogfile, archive_status_dir,
pg_xlog_dir, instance->arclog_path,
pg_xlog_dir, instanceState->instance_wal_subdir_path,
overwrite, no_sync,
instance->archive_timeout,
no_ready_rename || (strcmp(xlogfile->name, wal_file_name) == 0) ? true : false,
@@ -231,7 +231,7 @@ do_archive_push(InstanceConfig *instance, char *wal_file_path,
archive_push_arg *arg = &(threads_args[i]);

arg->first_filename = wal_file_name;
arg->archive_dir = instance->arclog_path;
arg->archive_dir = instanceState->instance_wal_subdir_path;
arg->pg_xlog_dir = pg_xlog_dir;
arg->archive_status_dir = archive_status_dir;
arg->overwrite = overwrite;
@@ -1009,7 +1009,7 @@ setup_push_filelist(const char *archive_status_dir, const char *first_file,

*/
void
do_archive_get(InstanceConfig *instance, const char *prefetch_dir_arg,
do_archive_get(InstanceState *instanceState, InstanceConfig *instance, const char *prefetch_dir_arg,
char *wal_file_path, char *wal_file_name, int batch_size,
bool validate_wal)
{
@@ -1047,8 +1047,8 @@ do_archive_get(InstanceConfig *instance, const char *prefetch_dir_arg,
join_path_components(absolute_wal_file_path, current_dir, wal_file_path);

/* full filepath to WAL file in archive directory.
* backup_path/wal/instance_name/000000010000000000000001 */
join_path_components(backup_wal_file_path, instance->arclog_path, wal_file_name);
* $BACKUP_PATH/wal/instance_name/000000010000000000000001 */
join_path_components(backup_wal_file_path, instanceState->instance_wal_subdir_path, wal_file_name);

INSTR_TIME_SET_CURRENT(start_time);
if (num_threads > batch_size)
@@ -1099,7 +1099,7 @@ do_archive_get(InstanceConfig *instance, const char *prefetch_dir_arg,
* copy requested file directly from archive.
*/
if (!next_wal_segment_exists(tli, segno, prefetch_dir, instance->xlog_seg_size))
n_fetched = run_wal_prefetch(prefetch_dir, instance->arclog_path,
n_fetched = run_wal_prefetch(prefetch_dir, instanceState->instance_wal_subdir_path,
tli, segno, num_threads, false, batch_size,
instance->xlog_seg_size);

@@ -1138,7 +1138,7 @@ do_archive_get(InstanceConfig *instance, const char *prefetch_dir_arg,
// rmtree(prefetch_dir, false);

/* prefetch files */
n_fetched = run_wal_prefetch(prefetch_dir, instance->arclog_path,
n_fetched = run_wal_prefetch(prefetch_dir, instanceState->instance_wal_subdir_path,
tli, segno, num_threads, true, batch_size,
instance->xlog_seg_size);

Loading