-
Notifications
You must be signed in to change notification settings - Fork 77
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
fix issue 149 and 150 #151
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -192,7 +192,7 @@ do_backup_database(parray *backup_list, pgBackupOption bkupopt) | |
uint32 xlogid, xrecoff; | ||
|
||
/* find last completed database backup */ | ||
prev_backup = catalog_get_last_full_backup(backup_list); | ||
prev_backup = catalog_get_lastest_backup(backup_list); | ||
if (prev_backup == NULL || prev_backup->tli != current.tli) | ||
{ | ||
if (current.full_backup_on_error) | ||
|
@@ -1091,11 +1091,12 @@ confirm_block_size(const char *name, int blcksz) | |
else if (strcmp(name, "wal_block_size") == 0) | ||
elog(DEBUG, "wal block size is %d", block_size); | ||
|
||
PQclear(res); | ||
//PQclear(res); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think to remove this line is ok. |
||
if ((endp && *endp) || block_size != blcksz) | ||
ereport(ERROR, | ||
(errcode(ERROR_PG_INCOMPATIBLE), | ||
errmsg("%s(%d) is not compatible(%d expected)", name, block_size, blcksz))); | ||
PQclear(res); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this patch needs to remove two branks before PQclear(res). |
||
} | ||
|
||
/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For #150, I think it's enough to undo "backup.c", "catalog.c" and "pg_rman.h" of this change .
Your patches check if the full backup exists or not, but this can't solve the meaningless incremental backup issue anyway. If my understanding is right, #154 should be handled if to solve the issue. So, I think it's better that your patches focus to solve the differential backup problem only. #154 will solve the meaningless incremental backup issue.
But, adding a test case is necessary to prevent this degradation for the future. pg_rman supports full backup and incremental backup, not differential backup. So I think we need to check it. Although there may be a better way, I came up with the following test case.
If incremental backup works, 3's backup's data size is big because 2's data is stored, but 4's backup's data is small.
In my environment, the following is the result.
a. differential backup
This is the result when using "REL_13_STABLE" branch.
Because the differential backup is got, the third backup size is big(798MB). I think the reason why the third one(798MB) is smaller than the second one(1435MB) is WAL archive data is not stored in the third one.
b. incremental backup
This is the result when using "REL_13_STABLE" branch and revert 447c19a.
Since this is an incremental backup, the third one is very small(33MB).
Though?