Repository navigation
chore: merge upstream adiom-data/dsync main (#387) - #23
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merges upstream
adiom-data/dsyncmain (fd27d7d, "Fixes for postgres and sink for sqlbatch (adiom-data#387)") into the fork, as a merge commit like #14.What comes from upstream
_idkept when it is a destination column, generated and identity columns, UUID binary values, batch close error checked, partial updates rejected withInvalidArgument); change stream sends per-transaction batches with the commit LSN and handles unchanged TOAST values; live tests behindPOSTGRES_TEST_URL.sqlbatch: new sink with PostgreSQL, SQL Server and Oracle dialects.main): unknown and empty partial updates stay a successful no-op and do not take part in deduplication; the_idis taken as the last id part.Fork-side fix
The textual merge is clean, but one upstream test called
buildIndexedBulkModelswithout the namespace argument the fork added. Fixed in a separate commit.Connection strings
Read, not only searched:
NewConnkeeps the fork's fixed message for an unparsable connection string, and the newsqlbatchsink code has no connect path of its own. The three upstream live tests callt.Fatal(err)on the connect error; pgx prints user, database and host there and redacts only the password. They run only whenPOSTGRES_TEST_URLis set, so use a local throwaway database.Notes for the open stack
#20, #21 and #22 conflict with this merge in
connectors/postgres/conn.go,connectors/postgres/pglib/stream.goandconnectors/postgres/pglib/stream_test.go. They are resolved on those branches, not here.Preferred order: this PR lands first, then the stack merges
main. If #20 merges this branch earlier, its diff shows the upstream lines until this PR lands.Merge this PR with a merge commit, not a squash, so the stacked branches that merge it keep a common history.
Test plan
go build ./...go vet ./...(only the existing "unkeyed fields" notices)go test ./...(all packages pass)POSTGRES_TEST_URLset