Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d10e5f1

Browse files
committed
Merge branch 'ptrack' of git.postgrespro.ru:pgpro-dev/pg_probackup into ptrack
2 parents d6b612e + 4c1dde8 commit d10e5f1

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

data.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ backup_data_page(pgFile *file, const XLogRecPtr *lsn,
9292
}
9393

9494
/*
95-
* If an invalid data page was found, fallback to simple copy to ensure
96-
* all pages in the file don't have BackupPageHeader.
97-
*/
95+
* If an invalid data page was found, fallback to simple copy to ensure
96+
* all pages in the file don't have BackupPageHeader.
97+
*/
9898
if (!parse_page(&page, &page_lsn))
9999
{
100100
int i;
@@ -234,9 +234,6 @@ backup_data_file(const char *from_root, const char *to_root,
234234
to_path, strerror(errno_tmp));
235235
}
236236

237-
/* confirm server version */
238-
check_server_version();
239-
240237
/*
241238
* Read each page, verify checksum and write it to backup.
242239
* If page map is not empty we scan only these blocks, otherwise

delete.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ do_deletewal(time_t backup_id, bool strict)
139139
parray_walk(backup_list, pgBackupFree);
140140
parray_free(backup_list);
141141

142-
delete_walfiles(oldest_lsn, oldest_tli, false);
142+
delete_walfiles(oldest_lsn, oldest_tli, true);
143143

144144
return 0;
145145
}
@@ -349,10 +349,11 @@ delete_walfiles(XLogRecPtr oldest_lsn, TimeLineID oldest_tli, bool delete_all)
349349
* they were originally written, in case this worries you.
350350
*/
351351
if (IsXLogFileName(arcde->d_name) ||
352-
IsPartialXLogFileName(arcde->d_name))
352+
IsPartialXLogFileName(arcde->d_name) ||
353+
IsBackupHistoryFileName(arcde->d_name))
353354
{
354355
if (XLogRecPtrIsInvalid(oldest_lsn) ||
355-
strcmp(arcde->d_name + 8, oldestSegmentNeeded + 8) < 0)
356+
strncmp(arcde->d_name + 8, oldestSegmentNeeded + 8, 16) < 0)
356357
{
357358
/*
358359
* Use the original file name again now, including any

0 commit comments

Comments
 (0)