Skip to content

Commit b622f31

Browse files
add template0 to skip database
1 parent 95e53be commit b622f31

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pkg/connector/database.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ var databaseResourceType = &v2.ResourceType{
2323
Annotations: nil,
2424
}
2525

26+
var databaseToSkip = map[string]bool{
27+
"template0": true,
28+
"template1": true,
29+
}
30+
2631
type databaseSyncer struct {
2732
resourceType *v2.ResourceType
2833
clientPool *postgres.ClientDatabasesPool
@@ -73,8 +78,8 @@ func (r *databaseSyncer) List(ctx context.Context, parentResourceID *v2.Resource
7378
continue
7479
}
7580

76-
if o.Name == "template1" {
77-
// Skip the template1 database, as it is a system database and not meant to be used directly.
81+
if databaseToSkip[o.Name] {
82+
// Skip system databases that are not meant to be synced.
7883
l.Debug("skipping system database", zap.String("database", o.Name))
7984
continue
8085
}

0 commit comments

Comments
 (0)