Skip to content

Conversation

@hermanschaaf
Copy link
Member

Currently using a dash in the source spec name field causes an error when using Postgres source with CDC:

Error: failed to sync v1 source name-dash: rpc error: code = Unknown desc = failed to sync resources: failed to sync unmanaged client: failed to create replication slot pg-motherduck with pgerror severity: ERROR, code: 42601, message: syntax error, detail :, hint: , position: 0, internal_position: 0, internal_query: , where: , schema_name: , table_name: , column_name: , data_type_name: , constraint_name: , file: repl_scanner.l, line: 246, routine: replication_yyerror: ERROR: syntax error (SQLSTATE 42601)

Generally we don't have such restrictions on the source name, so this change fixes it so that dashes are replaced with underscores when creating the replication slot.

@hermanschaaf hermanschaaf requested review from a team and yevgenypats and removed request for a team June 5, 2023 15:26
@hermanschaaf hermanschaaf changed the title fix(cdc): Allow dashes in source names when using postgres CDC fix(cdc): Allow dashes in source names when using Postgres CDC Jun 5, 2023
@hermanschaaf hermanschaaf added the automerge Automatically merge once required checks pass label Jun 5, 2023
@kodiakhq kodiakhq bot merged commit 1b7f65b into main Jun 5, 2023
@kodiakhq kodiakhq bot deleted the postgres-source-fix branch June 5, 2023 15:44
kodiakhq bot pushed a commit that referenced this pull request Jun 6, 2023
🤖 I have created a release *beep* *boop*
---


## [1.2.0](plugins-source-postgresql-v1.1.1...plugins-source-postgresql-v1.2.0) (2023-06-06)


### Features

* **deps:** Upgrade to Apache Arrow v13 (latest `cqmain`) ([#10605](#10605)) ([a55da3d](a55da3d))


### Bug Fixes

* **cdc:** Allow dashes in source names when using Postgres CDC ([#11219](#11219)) ([1b7f65b](1b7f65b))
* **deps:** Update github.com/apache/arrow/go/v13 digest to e07e22c ([#11151](#11151)) ([5083cf7](5083cf7))
* **deps:** Update github.com/cloudquery/arrow/go/v13 digest to 20b0de9 ([#11199](#11199)) ([dc3565d](dc3565d))
* **deps:** Update github.com/cloudquery/arrow/go/v13 digest to 88d5dc2 ([#11226](#11226)) ([9f306bc](9f306bc))
* **deps:** Update github.com/cloudquery/arrow/go/v13 digest to a7aad4c ([#11184](#11184)) ([8a0822e](8a0822e))
* **deps:** Update github.com/cloudquery/arrow/go/v13 digest to c67fb39 ([#11169](#11169)) ([dcb0f92](dcb0f92))
* **deps:** Update github.com/jackc/pglogrepl digest to 0c5b98f ([#11154](#11154)) ([b01b8e5](b01b8e5))
* **deps:** Update golang.org/x/exp digest to 2e198f4 ([#11155](#11155)) ([c46c62b](c46c62b))
* **deps:** Update google.golang.org/genproto digest to e85fd2c ([#11156](#11156)) ([dbe7e92](dbe7e92))
* **deps:** Update module github.com/cloudquery/plugin-pb-go to v1.0.8 ([#10798](#10798)) ([27ff430](27ff430))
* **deps:** Update module github.com/cloudquery/plugin-pb-go to v1.0.9 ([#11240](#11240)) ([f92cd4b](f92cd4b))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Automatically merge once required checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants