Closed whitehawk closed 2 weeks ago
The task is to adopt patch from the related issue to our gpdb 7 fork. The patch is https://github.com/arenadata/gpdb/pull/877 Why is src/backend/access/transam/xlogarchive.c not changed in this PR?
The task is to adopt patch from the related issue to our gpdb 7 fork. The patch is #877 Why is src/backend/access/transam/xlogarchive.c not changed in this PR?
On GPDB 7x the problem is not reproduced, so changes in xlogarchive.c are not required. But it is usefull to port the test from the related issue. So this PR is only about the test.
Add to the description something about why CHECKPOINT has been removed from the original patch
The commit adds tap-test to check that WAL files are not deleted at checkpoint.
Far ago, we've backported (https://github.com/arenadata/gpdb/commit/fa759d1bf70c020f884f05cf7ae15c6b9b47b4b1) archive_mode
always
to 6x. Since that, it was tested only manually. Later, there was a bug around WAL recycling depends on archive_mode. Upstream backported a fix (https://github.com/arenadata/gpdb/commit/4a5a95b3a62dadd73af73b76f8fed9deeea842a6), but the condition forXLogArchivingAlways()
was not backported, because upstream doesn't support it. As a result, WAL files on mirrors may be considered as removable and can be actually removed during restart point. Backporting of https://github.com/arenadata/gpdb/commit/78ea8b5daab9237fd42d7a8a836c1c451765499f solves the problem, but new tap-test was also added to prove it works and to show such cases.The upstream backport already covers WAL files on master instance, but I decided to add this check to test file too. Test file is heavily inspired by other test files from
recovery
dir.(cherry picked from commit https://github.com/arenadata/gpdb/commit/65478088ae5d1fb9a5c8213cf9655d6d48c45b43)
Changes comparing to the original commit are:
Commits in the PR shouldn't be squashed to preserve authorship.