You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-07 00:35:37 +02:00
Remove support for PostgreSQL 9.0/9.1/9.2.
Our new policy is to support ten versions of PostgreSQL, the five supported releases and the last five EOL releases. As of PostgreSQL 15, that means 9.0/9.1/9.2 are no longer supported by pgBackRest. Remove all logic associated with 9.0/9.1/9.2 and update the tests. Document the new support policy. Update InfoPg to read/write control versions for the history in backup.info, since we can no longer rely on the mappings being available. In theory this could have been an issue after removing 8.3/8.4 if anybody was using a version that old.
This commit is contained in:
@ -128,15 +128,6 @@ testRun(void)
|
||||
"backup-timestamp-stop=0\n" \
|
||||
"backup-type=\"full\"\n"
|
||||
|
||||
#define TEST_MANIFEST_DB_92 \
|
||||
"\n" \
|
||||
"[backup:db]\n" \
|
||||
"db-catalog-version=201204301\n" \
|
||||
"db-control-version=922\n" \
|
||||
"db-id=1\n" \
|
||||
"db-system-id=" HRN_PG_SYSTEMID_94_Z "\n" \
|
||||
"db-version=\"9.2\"\n"
|
||||
|
||||
#define TEST_MANIFEST_DB_94 \
|
||||
"\n" \
|
||||
"[backup:db]\n" \
|
||||
@ -238,7 +229,13 @@ testRun(void)
|
||||
HRN_INFO_PUT(
|
||||
storageRepoWrite(), STORAGE_REPO_BACKUP "/" TEST_BACKUP_LABEL_FULL "/" BACKUP_MANIFEST_FILE,
|
||||
TEST_MANIFEST_HEADER
|
||||
TEST_MANIFEST_DB_92
|
||||
"\n"
|
||||
"[backup:db]\n"
|
||||
"db-catalog-version=201306121\n"
|
||||
"db-control-version=937\n"
|
||||
"db-id=1\n"
|
||||
"db-system-id=" HRN_PG_SYSTEMID_94_Z "\n"
|
||||
"db-version=\"9.3\"\n"
|
||||
TEST_MANIFEST_OPTION_ALL
|
||||
TEST_MANIFEST_TARGET
|
||||
TEST_MANIFEST_DB
|
||||
@ -259,7 +256,7 @@ testRun(void)
|
||||
TEST_RESULT_LOG(
|
||||
"P00 DETAIL: unable to open missing file '" TEST_PATH "/repo/backup/db/20181119-152138F/backup.manifest.copy'"
|
||||
" for read\n"
|
||||
"P00 INFO: '20181119-152138F' may not be recoverable - PG data (id 1, version 9.2, system-id "
|
||||
"P00 INFO: '20181119-152138F' may not be recoverable - PG data (id 1, version 9.3, system-id "
|
||||
HRN_PG_SYSTEMID_94_Z ") is not in the backup.info history, skipping");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
@ -436,7 +433,7 @@ testRun(void)
|
||||
TEST_RESULT_LOG("P00 INFO: duplicate WAL '000000020000000200000000' for '9.4-1' exists, skipping");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
TEST_TITLE("FF Wal not skipped > 9.2, duplicates at beginning and end of list are removed");
|
||||
TEST_TITLE("duplicates at beginning and end of list are removed");
|
||||
|
||||
errTotal = 0;
|
||||
strLstAddZ(walFileList, "000000020000000100000000-daa497dba64008db824607940609ba1cd7c6c501.gz");
|
||||
@ -462,96 +459,6 @@ testRun(void)
|
||||
TEST_RESULT_LOG(
|
||||
"P00 INFO: duplicate WAL '000000020000000100000000' for '9.4-1' exists, skipping\n"
|
||||
"P00 INFO: duplicate WAL '000000020000000200000001' for '9.4-1' exists, skipping");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
TEST_TITLE("FF Wal skipped <= 9.2, duplicates in middle of list removed");
|
||||
|
||||
// Clear the range lists and rerun the test with PG_VERSION_92 to ensure FF is reported as an error
|
||||
lstClear(archiveIdResult->walRangeList);
|
||||
errTotal = 0;
|
||||
archiveIdResult->archiveId = strNewZ("9.2-1");
|
||||
archiveIdResult->pgWalInfo.version = PG_VERSION_92;
|
||||
|
||||
strLstAddZ(walFileList, "000000020000000200000001");
|
||||
strLstAddZ(walFileList, "000000020000000200000001");
|
||||
strLstAddZ(walFileList, "000000020000000200000002");
|
||||
|
||||
TEST_RESULT_VOID(verifyCreateArchiveIdRange(archiveIdResult, walFileList, &errTotal), "create archiveId WAL range");
|
||||
TEST_RESULT_UINT(errTotal, 2, "error reported");
|
||||
TEST_RESULT_UINT(lstSize(((VerifyArchiveResult *)lstGet(archiveIdResultList, 0))->walRangeList), 2, "multiple ranges");
|
||||
TEST_ASSIGN(
|
||||
walRangeResult, (VerifyWalRange *)lstGet(((VerifyArchiveResult *)lstGet(archiveIdResultList, 0))->walRangeList, 0),
|
||||
"get range");
|
||||
TEST_RESULT_STR_Z(walRangeResult->start, "0000000200000001000000FD", "start range");
|
||||
TEST_RESULT_STR_Z(walRangeResult->stop, "000000020000000200000000", "stop range");
|
||||
TEST_ASSIGN(
|
||||
walRangeResult, (VerifyWalRange *)lstGet(((VerifyArchiveResult *)lstGet(archiveIdResultList, 0))->walRangeList, 1),
|
||||
"get second range");
|
||||
TEST_RESULT_STR_Z(walRangeResult->start, "000000020000000200000002", "start range");
|
||||
TEST_RESULT_STR_Z(walRangeResult->stop, "000000020000000200000002", "stop range");
|
||||
|
||||
TEST_RESULT_LOG(
|
||||
"P00 INFO: invalid WAL '0000000200000001000000FF' for '9.2-1' exists, skipping\n"
|
||||
"P00 INFO: duplicate WAL '000000020000000200000001' for '9.2-1' exists, skipping");
|
||||
|
||||
TEST_RESULT_STRLST_Z(
|
||||
walFileList,
|
||||
"0000000200000001000000FD-daa497dba64008db824607940609ba1cd7c6c501.gz\n"
|
||||
"0000000200000001000000FE-a6e1a64f0813352bc2e97f116a1800377e17d2e4.gz\n"
|
||||
"000000020000000200000000\n000000020000000200000002\n",
|
||||
"skipped files removed");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
TEST_TITLE("Rerun <= 9.2, missing FF not a gap");
|
||||
|
||||
// Clear the range lists, rerun the PG_VERSION_92 test to ensure the missing FF is not considered a gap
|
||||
lstClear(archiveIdResult->walRangeList);
|
||||
errTotal = 0;
|
||||
|
||||
TEST_RESULT_VOID(verifyCreateArchiveIdRange(archiveIdResult, walFileList, &errTotal), "create archiveId WAL range");
|
||||
TEST_RESULT_UINT(errTotal, 0, "error reported");
|
||||
TEST_RESULT_UINT(lstSize(((VerifyArchiveResult *)lstGet(archiveIdResultList, 0))->walRangeList), 2, "multiple ranges");
|
||||
TEST_ASSIGN(
|
||||
walRangeResult, (VerifyWalRange *)lstGet(((VerifyArchiveResult *)lstGet(archiveIdResultList, 0))->walRangeList, 0),
|
||||
"get range");
|
||||
TEST_RESULT_STR_Z(walRangeResult->start, "0000000200000001000000FD", "start range");
|
||||
TEST_RESULT_STR_Z(walRangeResult->stop, "000000020000000200000000", "stop range");
|
||||
TEST_ASSIGN(
|
||||
walRangeResult, (VerifyWalRange *)lstGet(((VerifyArchiveResult *)lstGet(archiveIdResultList, 0))->walRangeList, 1),
|
||||
"get second range");
|
||||
TEST_RESULT_STR_Z(walRangeResult->start, "000000020000000200000002", "start range");
|
||||
TEST_RESULT_STR_Z(walRangeResult->stop, "000000020000000200000002", "stop range");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
TEST_TITLE("version > 9.2, missing FF is a gap");
|
||||
|
||||
// Clear the range lists and update the version > 9.2 so missing FF is considered a gap in the WAL ranges
|
||||
lstClear(archiveIdResult->walRangeList);
|
||||
errTotal = 0;
|
||||
archiveIdResult->archiveId = strNewZ("9.6-1");
|
||||
archiveIdResult->pgWalInfo.version = PG_VERSION_96;
|
||||
|
||||
strLstAddZ(walFileList, "000000020000000200000003-123456");
|
||||
strLstAddZ(walFileList, "000000020000000200000004-123456");
|
||||
|
||||
TEST_RESULT_VOID(verifyCreateArchiveIdRange(archiveIdResult, walFileList, &errTotal), "create archiveId WAL range");
|
||||
TEST_RESULT_UINT(errTotal, 0, "no errors");
|
||||
TEST_RESULT_UINT(lstSize(((VerifyArchiveResult *)lstGet(archiveIdResultList, 0))->walRangeList), 3, "multiple ranges");
|
||||
TEST_ASSIGN(
|
||||
walRangeResult, (VerifyWalRange *)lstGet(((VerifyArchiveResult *)lstGet(archiveIdResultList, 0))->walRangeList, 0),
|
||||
"get first range");
|
||||
TEST_RESULT_STR_Z(walRangeResult->start, "0000000200000001000000FD", "start range");
|
||||
TEST_RESULT_STR_Z(walRangeResult->stop, "0000000200000001000000FE", "stop range");
|
||||
TEST_ASSIGN(
|
||||
walRangeResult, (VerifyWalRange *)lstGet(((VerifyArchiveResult *)lstGet(archiveIdResultList, 0))->walRangeList, 1),
|
||||
"get second range");
|
||||
TEST_RESULT_STR_Z(walRangeResult->start, "000000020000000200000000", "start range");
|
||||
TEST_RESULT_STR_Z(walRangeResult->stop, "000000020000000200000000", "stop range");
|
||||
TEST_ASSIGN(
|
||||
walRangeResult, (VerifyWalRange *)lstGet(((VerifyArchiveResult *)lstGet(archiveIdResultList, 0))->walRangeList, 2),
|
||||
"get third range");
|
||||
TEST_RESULT_STR_Z(walRangeResult->start, "000000020000000200000002", "start range");
|
||||
TEST_RESULT_STR_Z(walRangeResult->stop, "000000020000000200000004", "stop range");
|
||||
}
|
||||
|
||||
// *****************************************************************************************************************************
|
||||
|
Reference in New Issue
Block a user