From 39cc1e865d805997fc59c6698a038ebea6987623 Mon Sep 17 00:00:00 2001 From: Vasiliy Ivanov Date: Tue, 14 Dec 2021 13:39:07 +1000 Subject: [PATCH] remove checks for external tables in queued backup We've moved all external tables check from backup data routines in 76830c67075ae5e21afe0b0ce1dee7b0ee91418b. There is new routine to backup into single data file with a connection queue implemented in 5925c1edf3be958e10044c98eff8f037ddc55227. So remove checks from this new routine to as useless. Co-authored-by: Polina Bungina --- backup/data.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/backup/data.go b/backup/data.go index cdd913ac3..04e20a7d1 100644 --- a/backup/data.go +++ b/backup/data.go @@ -120,13 +120,7 @@ func BackupSingleTableData(table Table, rowsCopiedMap map[uint32]int64, counters // workers encounter locking issues. Worker 0 already has all locks on the // tables so it will not run into locking issues. func backupDataForAllTablesCopyQueue(tables []Table) []map[uint32]int64 { - var numExtOrForeignTables int64 - for _, table := range tables { - if table.SkipDataBackup() { - numExtOrForeignTables++ - } - } - counters := BackupProgressCounters{NumRegTables: 0, TotalRegTables: int64(len(tables)) - numExtOrForeignTables} + counters := BackupProgressCounters{NumRegTables: 0, TotalRegTables: int64(len(tables))} counters.ProgressBar = utils.NewProgressBar(int(counters.TotalRegTables), "Tables backed up: ", utils.PB_INFO) counters.ProgressBar.Start() rowsCopiedMaps := make([]map[uint32]int64, connectionPool.NumConns) @@ -158,11 +152,6 @@ func backupDataForAllTablesCopyQueue(tables []Table) []map[uint32]int64 { return } - if table.SkipDataBackup() { - gplog.Verbose("Skipping data backup of table %s because it is either an external or foreign table.", table.FQN()) - oidMap.Store(table.Oid, Complete) - continue - } // If a random external SQL command had queued an AccessExclusiveLock acquisition request // against this next table, the --job worker thread would deadlock on the COPY attempt. // To prevent gpbackup from hanging, we attempt to acquire an AccessShareLock on the @@ -261,7 +250,6 @@ func backupDataForAllTablesCopyQueue(tables []Table) []map[uint32]int64 { } counters.ProgressBar.Finish() - printDataBackupWarnings(numExtOrForeignTables) return rowsCopiedMaps }