Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 src/backup.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ do_backup_pg(InstanceState *instanceState, PGconn *backup_conn,
elog(ERROR, "Failed to find file \"%s\" in backup filelist.",
XLOG_CONTROL_FILE);

set_min_recovery_point(pg_control, current.database_dir, current.stop_lsn);
set_min_recovery_point(pg_control, instance_config.pgdata, current.database_dir, current.stop_lsn);
}

/* close and sync page header map */
Expand Down
2 changes: 1 addition & 1 deletion src/catchup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@ do_catchup(const char *source_pgdata, const char *dest_pgdata, int num_threads,
*/
if (current.from_replica && !exclusive_backup)
{
set_min_recovery_point(source_pg_control_file, dest_pgdata, current.stop_lsn);
set_min_recovery_point(source_pg_control_file, source_pgdata, dest_pgdata, current.stop_lsn);
}

/* close ssh session in main thread */
Expand Down
2 changes: 1 addition & 1 deletion src/pg_probackup.h
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ extern uint32 get_data_checksum_version(bool safe);
extern pg_crc32c get_pgcontrol_checksum(const char *pgdata_path);
extern uint32 get_xlog_seg_size(const char *pgdata_path);
extern void get_redo(const char *pgdata_path, fio_location pgdata_location, RedoParams *redo);
extern void set_min_recovery_point(pgFile *file, const char *backup_path,
extern void set_min_recovery_point(pgFile *file, const char *source_pgdata, const char *backup_path,
XLogRecPtr stop_backup_lsn);
extern void get_control_file_or_back_file(const char *pgdata_path, fio_location location,
ControlFileData *control);
Expand Down
4 changes: 2 additions & 2 deletions src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ get_redo(const char *pgdata_path, fio_location pgdata_location, RedoParams *redo
* 'as-is' is not to be trusted.
*/
void
set_min_recovery_point(pgFile *file, const char *backup_path,
set_min_recovery_point(pgFile *file, const char *source_pgdata, const char *backup_path,
XLogRecPtr stop_backup_lsn)
{
ControlFileData ControlFile;
Expand All @@ -405,7 +405,7 @@ set_min_recovery_point(pgFile *file, const char *backup_path,
char fullpath[MAXPGPATH];

/* First fetch file content */
buffer = slurpFile(instance_config.pgdata, XLOG_CONTROL_FILE, &size, false, FIO_DB_HOST);
buffer = slurpFile(source_pgdata, XLOG_CONTROL_FILE, &size, false, FIO_DB_HOST);
digestControlFile(&ControlFile, buffer, size);

elog(LOG, "Current minRecPoint %X/%X",
Expand Down