Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions backup/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"sync"
"time"

"github.com/greenplum-db/gp-common-go-libs/cluster"
"github.com/greenplum-db/gp-common-go-libs/dbconn"
"github.com/greenplum-db/gp-common-go-libs/gplog"
"github.com/greenplum-db/gp-common-go-libs/operating"
"github.com/greenplum-db/gpbackup/cluster"
"github.com/greenplum-db/gpbackup/dbconn"
"github.com/greenplum-db/gpbackup/filepath"
"github.com/greenplum-db/gpbackup/gplog"
"github.com/greenplum-db/gpbackup/history"
"github.com/greenplum-db/gpbackup/operating"
"github.com/greenplum-db/gpbackup/options"
"github.com/greenplum-db/gpbackup/report"
"github.com/greenplum-db/gpbackup/toc"
Expand Down
2 changes: 1 addition & 1 deletion backup/backup_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package backup
import (
"sync"

"github.com/greenplum-db/gp-common-go-libs/testhelper"
"github.com/greenplum-db/gpbackup/filepath"
"github.com/greenplum-db/gpbackup/options"
"github.com/greenplum-db/gpbackup/testhelper"
"github.com/spf13/pflag"

. "github.com/onsi/ginkgo/v2"
Expand Down
2 changes: 1 addition & 1 deletion backup/backup_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"testing"

"github.com/DATA-DOG/go-sqlmock"
"github.com/greenplum-db/gp-common-go-libs/dbconn"
"github.com/greenplum-db/gpbackup/backup"
"github.com/greenplum-db/gpbackup/dbconn"
"github.com/greenplum-db/gpbackup/testutils"
"github.com/greenplum-db/gpbackup/toc"
"github.com/greenplum-db/gpbackup/utils"
Expand Down
4 changes: 2 additions & 2 deletions backup/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"sync/atomic"
"time"

"github.com/greenplum-db/gp-common-go-libs/dbconn"
"github.com/greenplum-db/gp-common-go-libs/gplog"
"github.com/greenplum-db/gpbackup/dbconn"
"github.com/greenplum-db/gpbackup/gplog"
"github.com/greenplum-db/gpbackup/options"
"github.com/greenplum-db/gpbackup/utils"
"github.com/jackc/pgx/v5/pgconn"
Expand Down
7 changes: 3 additions & 4 deletions backup/dependencies.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ import (
"sort"
"strings"

"github.com/greenplum-db/gp-common-go-libs/dbconn"
"github.com/greenplum-db/gp-common-go-libs/gplog"
"github.com/greenplum-db/gpbackup/dbconn"
"github.com/greenplum-db/gpbackup/gplog"
"github.com/greenplum-db/gpbackup/toc"
"github.com/greenplum-db/gpbackup/utils"
"github.com/pkg/errors"
)

/* This file contains functions to sort objects that have dependencies among themselves.
Expand Down Expand Up @@ -138,7 +137,7 @@ STAGE2:
}
}
}
gplog.Fatal(errors.Errorf("Dependency resolution failed; see log file %s for details. This is a bug, please report.", gplog.GetLogFilePath()), "")
gplog.Fatal(fmt.Errorf("Dependency resolution failed; see log file %s for details. This is a bug, please report.", gplog.GetLogFilePath()), "")
}
assignCohorts(slice, dependencies, isDependentOn, tierMap)
return sorted, tierMap
Expand Down
2 changes: 1 addition & 1 deletion backup/dependencies_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"database/sql"
"fmt"

"github.com/greenplum-db/gp-common-go-libs/testhelper"
"github.com/greenplum-db/gpbackup/backup"
"github.com/greenplum-db/gpbackup/testhelper"
"github.com/greenplum-db/gpbackup/testutils"

. "github.com/onsi/ginkgo/v2"
Expand Down
6 changes: 3 additions & 3 deletions backup/global_variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package backup
import (
"sync"

"github.com/greenplum-db/gp-common-go-libs/cluster"
"github.com/greenplum-db/gp-common-go-libs/dbconn"
"github.com/greenplum-db/gpbackup/cluster"
"github.com/greenplum-db/gpbackup/dbconn"
"github.com/greenplum-db/gpbackup/filepath"
"github.com/greenplum-db/gpbackup/options"
"github.com/greenplum-db/gpbackup/report"
Expand All @@ -27,7 +27,7 @@ const (
Deferred
Complete
PG_LOCK_NOT_AVAILABLE = "55P03"
ENUM_TYPE_OID = 3500
ENUM_TYPE_OID = 3500
)

/*
Expand Down
9 changes: 4 additions & 5 deletions backup/incremental.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ import (
"fmt"
"path"

"github.com/greenplum-db/gp-common-go-libs/gplog"
"github.com/greenplum-db/gp-common-go-libs/operating"
"github.com/greenplum-db/gpbackup/gplog"
"github.com/greenplum-db/gpbackup/history"
"github.com/greenplum-db/gpbackup/operating"
"github.com/greenplum-db/gpbackup/options"
"github.com/greenplum-db/gpbackup/toc"
"github.com/greenplum-db/gpbackup/utils"
"github.com/pkg/errors"
)

func FilterTablesForIncremental(lastBackupTOC, currentTOC *toc.TOC, tables []Table) []Table {
Expand Down Expand Up @@ -53,7 +52,7 @@ func GetLatestMatchingBackupTimestamp() string {
}

if latestMatchingBackupHistoryEntry == nil {
gplog.FatalOnError(errors.Errorf("There was no matching previous backup found with the flags provided. " +
gplog.FatalOnError(fmt.Errorf("There was no matching previous backup found with the flags provided. " +
"Please take a full backup."))
} else {
latestTimestamp = latestMatchingBackupHistoryEntry.Timestamp
Expand All @@ -77,7 +76,7 @@ func GetLatestMatchingBackupConfig(historyDBPath string, currentBackupConfig *hi
currentBackupConfig.Plugin,
MustGetFlagBool(options.SINGLE_DATA_FILE),
currentBackupConfig.Compressed,
history.BackupStatusSucceed)
history.BackupStatusSucceed)

getBackupTimetampsQuery := fmt.Sprintf(`
SELECT timestamp
Expand Down
6 changes: 3 additions & 3 deletions backup/incremental_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package backup_test
import (
"os"

"github.com/greenplum-db/gp-common-go-libs/operating"
"github.com/greenplum-db/gp-common-go-libs/structmatcher"
"github.com/greenplum-db/gp-common-go-libs/testhelper"
"github.com/greenplum-db/gpbackup/backup"
"github.com/greenplum-db/gpbackup/filepath"
"github.com/greenplum-db/gpbackup/history"
"github.com/greenplum-db/gpbackup/operating"
"github.com/greenplum-db/gpbackup/report"
"github.com/greenplum-db/gpbackup/structmatcher"
"github.com/greenplum-db/gpbackup/testhelper"
"github.com/greenplum-db/gpbackup/testutils"
"github.com/greenplum-db/gpbackup/toc"

Expand Down
2 changes: 1 addition & 1 deletion backup/metadata_globals.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"strings"

"github.com/greenplum-db/gp-common-go-libs/gplog"
"github.com/greenplum-db/gpbackup/gplog"
"github.com/greenplum-db/gpbackup/toc"
"github.com/greenplum-db/gpbackup/utils"
)
Expand Down
2 changes: 1 addition & 1 deletion backup/metadata_globals_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package backup_test
import (
"fmt"

"github.com/greenplum-db/gp-common-go-libs/testhelper"
"github.com/greenplum-db/gpbackup/backup"
"github.com/greenplum-db/gpbackup/testhelper"
"github.com/greenplum-db/gpbackup/testutils"
"github.com/greenplum-db/gpbackup/toc"

Expand Down
8 changes: 4 additions & 4 deletions backup/postdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ package backup
*/

import (
"fmt"
"strings"

"github.com/greenplum-db/gp-common-go-libs/gplog"
"github.com/greenplum-db/gpbackup/gplog"
"github.com/greenplum-db/gpbackup/toc"
"github.com/greenplum-db/gpbackup/utils"
"github.com/pkg/errors"
)

func PrintCreateIndexStatements(metadataFile *utils.FileWithByteCount, objToc *toc.TOC, indexes []IndexDefinition, indexMetadata MetadataMap) {
Expand Down Expand Up @@ -52,7 +52,7 @@ func PrintCreateIndexStatements(metadataFile *utils.FileWithByteCount, objToc *t
cols := strings.Split(index.StatisticsColumns, ",")
vals := strings.Split(index.StatisticsValues, ",")
if len(cols) != len(vals) {
gplog.Fatal(errors.Errorf("Index StatisticsColumns(%d) and StatisticsValues(%d) count don't match\n", len(cols), len(vals)), "")
gplog.Fatal(fmt.Errorf("Index StatisticsColumns(%d) and StatisticsValues(%d) count don't match\n", len(cols), len(vals)), "")
}
for i := 0; i < len(cols); i++ {
start := metadataFile.ByteCount
Expand Down Expand Up @@ -155,7 +155,7 @@ func PrintCreatePolicyStatements(metadataFile *utils.FileWithByteCount, objToc *
case "d":
cmdOption = " FOR DELETE"
default:
gplog.Fatal(errors.Errorf("Unexpected policy command: expected '*|r|a|w|d' got '%s'\n", policy.Cmd), "")
gplog.Fatal(fmt.Errorf("Unexpected policy command: expected '*|r|a|w|d' got '%s'\n", policy.Cmd), "")
}
}
start = metadataFile.ByteCount
Expand Down
4 changes: 2 additions & 2 deletions backup/predata_acl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"fmt"

"github.com/DATA-DOG/go-sqlmock"
"github.com/greenplum-db/gp-common-go-libs/structmatcher"
"github.com/greenplum-db/gp-common-go-libs/testhelper"
"github.com/greenplum-db/gpbackup/backup"
"github.com/greenplum-db/gpbackup/structmatcher"
"github.com/greenplum-db/gpbackup/testhelper"
"github.com/greenplum-db/gpbackup/testutils"
"github.com/greenplum-db/gpbackup/toc"

Expand Down
2 changes: 1 addition & 1 deletion backup/predata_externals_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package backup_test
import (
"database/sql"

"github.com/greenplum-db/gp-common-go-libs/testhelper"
"github.com/greenplum-db/gpbackup/backup"
"github.com/greenplum-db/gpbackup/testhelper"
"github.com/greenplum-db/gpbackup/testutils"
"github.com/greenplum-db/gpbackup/toc"

Expand Down
2 changes: 1 addition & 1 deletion backup/predata_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package backup
import (
"fmt"

"github.com/greenplum-db/gp-common-go-libs/gplog"
"github.com/greenplum-db/gpbackup/gplog"
"github.com/greenplum-db/gpbackup/toc"
"github.com/greenplum-db/gpbackup/utils"
)
Expand Down
2 changes: 1 addition & 1 deletion backup/predata_functions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"database/sql"
"fmt"

"github.com/greenplum-db/gp-common-go-libs/testhelper"
"github.com/greenplum-db/gpbackup/backup"
"github.com/greenplum-db/gpbackup/testhelper"
"github.com/greenplum-db/gpbackup/testutils"
"github.com/greenplum-db/gpbackup/toc"

Expand Down
8 changes: 3 additions & 5 deletions backup/predata_relations.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ import (
"strconv"
"strings"

"github.com/pkg/errors"

"github.com/greenplum-db/gp-common-go-libs/dbconn"
"github.com/greenplum-db/gp-common-go-libs/gplog"
"github.com/greenplum-db/gpbackup/dbconn"
"github.com/greenplum-db/gpbackup/gplog"
"github.com/greenplum-db/gpbackup/options"
"github.com/greenplum-db/gpbackup/toc"
"github.com/greenplum-db/gpbackup/utils"
Expand Down Expand Up @@ -367,7 +365,7 @@ func PrintIdentityColumns(metadataFile *utils.FileWithByteCount, objToc *toc.TOC
} else if seq.OwningColumnAttIdentity == "d" {
attrIdentityStr = "BY DEFAULT"
} else {
gplog.Fatal(errors.Errorf("Invalid Owning Column Attribute came for Identity sequence: expected 'a' or 'd', got '%s'\n", seq.OwningColumnAttIdentity), "")
gplog.Fatal(fmt.Errorf("Invalid Owning Column Attribute came for Identity sequence: expected 'a' or 'd', got '%s'\n", seq.OwningColumnAttIdentity), "")
}

metadataFile.MustPrintf("ALTER TABLE %s\nALTER COLUMN %s ADD GENERATED %s AS IDENTITY (",
Expand Down
4 changes: 2 additions & 2 deletions backup/predata_relations_other_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"math"
"sort"

"github.com/greenplum-db/gp-common-go-libs/structmatcher"
"github.com/greenplum-db/gp-common-go-libs/testhelper"
"github.com/greenplum-db/gpbackup/backup"
"github.com/greenplum-db/gpbackup/options"
"github.com/greenplum-db/gpbackup/structmatcher"
"github.com/greenplum-db/gpbackup/testhelper"
"github.com/greenplum-db/gpbackup/testutils"
"github.com/greenplum-db/gpbackup/toc"

Expand Down
2 changes: 1 addition & 1 deletion backup/predata_relations_tables_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package backup_test
import (
"database/sql"

"github.com/greenplum-db/gp-common-go-libs/testhelper"
"github.com/greenplum-db/gpbackup/backup"
"github.com/greenplum-db/gpbackup/testhelper"
"github.com/greenplum-db/gpbackup/testutils"
"github.com/greenplum-db/gpbackup/toc"

Expand Down
7 changes: 4 additions & 3 deletions backup/predata_shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ package backup
*/

import (
"github.com/greenplum-db/gp-common-go-libs/gplog"
"fmt"

"github.com/greenplum-db/gpbackup/gplog"
"github.com/greenplum-db/gpbackup/toc"
"github.com/greenplum-db/gpbackup/utils"
"github.com/pkg/errors"
)

/*
Expand Down Expand Up @@ -77,7 +78,7 @@ func PrintAccessMethodStatements(metadataFile *utils.FileWithByteCount, objToc *
case "i":
methodTypeStr = toc.OBJ_INDEX
default:
gplog.Fatal(errors.Errorf("Invalid access method type: expected 't' or 'i', got '%s'\n", method.Type), "")
gplog.Fatal(fmt.Errorf("Invalid access method type: expected 't' or 'i', got '%s'\n", method.Type), "")
}
metadataFile.MustPrintf("\n\nCREATE ACCESS METHOD %s TYPE %s HANDLER %s;", method.Name, methodTypeStr, method.Handler)
section, entry := method.GetMetadataEntry()
Expand Down
5 changes: 2 additions & 3 deletions backup/predata_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ import (
"fmt"
"strings"

"github.com/greenplum-db/gp-common-go-libs/gplog"
"github.com/greenplum-db/gpbackup/gplog"
"github.com/greenplum-db/gpbackup/toc"
"github.com/greenplum-db/gpbackup/utils"
"github.com/pkg/errors"
)

/*
Expand Down Expand Up @@ -221,7 +220,7 @@ func PrintCreateCollationStatements(metadataFile *utils.FileWithByteCount, objTo
case "d":
providerOption = "default"
default:
gplog.Fatal(errors.Errorf("Unexpected collation provider: expected 'c|i|d' got '%s'\n", collation.Provider), "")
gplog.Fatal(fmt.Errorf("Unexpected collation provider: expected 'c|i|d' got '%s'\n", collation.Provider), "")
}
metadataFile.MustPrintf(", PROVIDER = '%s'", providerOption)
}
Expand Down
4 changes: 2 additions & 2 deletions backup/queries_acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"fmt"
"sort"

"github.com/greenplum-db/gp-common-go-libs/dbconn"
"github.com/greenplum-db/gp-common-go-libs/gplog"
"github.com/greenplum-db/gpbackup/dbconn"
"github.com/greenplum-db/gpbackup/gplog"
"github.com/greenplum-db/gpbackup/toc"
)

Expand Down
2 changes: 1 addition & 1 deletion backup/queries_acl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"regexp"

"github.com/DATA-DOG/go-sqlmock"
"github.com/greenplum-db/gp-common-go-libs/structmatcher"
"github.com/greenplum-db/gpbackup/backup"
"github.com/greenplum-db/gpbackup/structmatcher"
"github.com/greenplum-db/gpbackup/toc"

. "github.com/onsi/ginkgo/v2"
Expand Down
4 changes: 2 additions & 2 deletions backup/queries_externals.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package backup
*/

import (
"github.com/greenplum-db/gp-common-go-libs/dbconn"
"github.com/greenplum-db/gp-common-go-libs/gplog"
"github.com/greenplum-db/gpbackup/dbconn"
"github.com/greenplum-db/gpbackup/gplog"
"github.com/greenplum-db/gpbackup/toc"
)

Expand Down
4 changes: 2 additions & 2 deletions backup/queries_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"regexp"
"strings"

"github.com/greenplum-db/gp-common-go-libs/dbconn"
"github.com/greenplum-db/gp-common-go-libs/gplog"
"github.com/greenplum-db/gpbackup/dbconn"
"github.com/greenplum-db/gpbackup/gplog"
"github.com/greenplum-db/gpbackup/toc"
"github.com/greenplum-db/gpbackup/utils"
)
Expand Down
2 changes: 1 addition & 1 deletion backup/queries_functions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"database/sql/driver"

"github.com/DATA-DOG/go-sqlmock"
"github.com/greenplum-db/gp-common-go-libs/structmatcher"
"github.com/greenplum-db/gpbackup/backup"
"github.com/greenplum-db/gpbackup/structmatcher"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
4 changes: 2 additions & 2 deletions backup/queries_globals.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ package backup
import (
"fmt"

"github.com/greenplum-db/gp-common-go-libs/dbconn"
"github.com/greenplum-db/gp-common-go-libs/gplog"
"github.com/greenplum-db/gpbackup/dbconn"
"github.com/greenplum-db/gpbackup/gplog"
"github.com/greenplum-db/gpbackup/toc"
"github.com/greenplum-db/gpbackup/utils"
)
Expand Down
Loading