Merge pull request #31 from citusdata/upgrade

Handle case of partially-present metadata.
merge-cstore-pykello
jeff-davis 2020-11-03 12:15:51 -08:00 committed by GitHub
commit 4339e91193
1 changed files with 9 additions and 0 deletions

View File

@ -740,6 +740,15 @@ DeleteDataFileMetadataRowIfExists(Oid relfilenode)
SysScanDesc scanDescriptor = NULL;
HeapTuple heapTuple = NULL;
/*
* During a restore for binary upgrade, metadata tables and indexes may or
* may not exist.
*/
if (IsBinaryUpgrade)
{
return;
}
ScanKeyInit(&scanKey[0], Anum_cstore_data_files_relfilenode,
BTEqualStrategyNumber, F_OIDEQ, Int32GetDatum(relfilenode));