Skip to content
Closed
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
11 changes: 1 addition & 10 deletions plugins/destination/postgresql/client/insert.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,7 @@ func (c *Client) InsertBatch(ctx context.Context, messages message.WriteInserts)
return err
}

include := make([]string, len(tables))
for i, table := range tables {
include[i] = table.Name
}
var exclude []string
pgTables, err := c.listTables(ctx, include, exclude)
if err != nil {
return err
}
tables = c.normalizeTables(tables, pgTables)
tables = c.normalizeTables(tables, tables)
if err != nil {
return err
}
Expand Down
3 changes: 3 additions & 0 deletions plugins/destination/postgresql/client/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ func (c *Client) normalizeTable(table *schema.Table, pgTable *schema.Table) *sch

if pgTable != nil && pgTable.PkConstraintName != "" {
normalizedTable.PkConstraintName = pgTable.PkConstraintName
} else {
// TODO: Check if this is OK
normalizedTable.PkConstraintName = table.Name + "_cqpk"
}

return &normalizedTable
Expand Down
4 changes: 2 additions & 2 deletions plugins/destination/postgresql/client/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

const (
defaultBatchSize = 10000
defaultBatchSizeBytes = 1000000
defaultBatchTimeout = 10 * time.Second
defaultBatchSizeBytes = 100000000
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also should be in the doc + should be a major bump

defaultBatchTimeout = 60 * time.Second
)

type Spec struct {
Expand Down