Last active
June 14, 2024 13:43
-
-
Save alexhwoods/4c4c90d83db3c47d9303cb734135130d to your computer and use it in GitHub Desktop.
Revisions
-
alexhwoods revised this gist
Feb 21, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ Aiven doesn't allow you to have a superuser. Debezium tries to create a publicat # How To Fix It We have to create the publication before configuring the connector. **Publications are database specific, so you have to do this when you're connected to the database you're going to use for CDC.** There is a package called [aiven-extras](https://github.com/aiven/aiven-extras) that allows you to create a publication. -
alexhwoods revised this gist
Feb 21, 2020 . 1 changed file with 12 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,21 +6,28 @@ You're getting this error: `Caused by: org.postgresql.util.PSQLException: ERROR: # Why This is Happening Aiven doesn't allow you to have a superuser. Debezium tries to create a publication, and fails, because it's not using a superuser. # How To Fix It We have to create the publication before configuring the connector. Publications are database specific, so you have to do this when you're connected to the database you're going to use for CDC. There is a package called [aiven-extras](https://github.com/aiven/aiven-extras) that allows you to create a publication. 1. Connect to the database you'll use. ``` \connect foodb; ``` 2. Install aiven-extras ``` CREATE EXTENSION aiven_extras CASCADE; ``` 3. Create a publication for all tables ```sql SELECT * FROM aiven_extras.pg_create_publication_for_all_tables('dbz_publication', 'INSERT,UPDATE,DELETE'); ``` It must be called `dbz_publication`. That is what Debezium is expecting. -
alexhwoods revised this gist
Jan 6, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,7 @@ CREATE EXTENSION aiven_extras CASCADE; 2. Create a publication for all tables ```sql SELECT * FROM aiven_extras.pg_create_publication_for_all_tables('dbz_publication', 'INSERT,UPDATE,DELETE') ``` It must be called `dbz_publication`. That is what Debezium is expecting. -
alexhwoods created this gist
Jan 6, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ # Issue You're trying to use Kafka Connect, using the Debezium to Postgres, and your Postgres database is running on Aiven. You have `pgoutput` selected as the plugin name (this is the best choice). You're getting this error: `Caused by: org.postgresql.util.PSQLException: ERROR: must be superuser to create FOR ALL TABLES publication`. # Why This is Happening Aiven doesn't allow you to have a superuser. Debezium tries to create a publication, and fails, because it's not using a superuser. # How To Fix It We have to create the publication before configuring the connector. There is a package called [aiven-extras](https://github.com/aiven/aiven-extras) that allows you to create a publication. 1. Install aiven-extras ``` CREATE EXTENSION aiven_extras CASCADE; ``` 2. Create a publication for all tables ```sql SELECT * FROM aiven_extras.pg_create_publication_for_all_tables('dbz_publication', 'INSERT') ``` It must be called `dbz_publication`. That is what Debezium is expecting. Now, you can run your connector and it should work (or you might have other, likely fixable issues).