In order to run the test suite against an Amazon RDS PostgreSQL environment, there are several important steps that must be done in order for Debezium features to operate correctly on RDS and to allow remote connectivity to your Amazon Virtual Private Cloud (VPC) environment.
When you setup an account with Amazon RDS, they should automatically create a new Security Group for your VPC environment. By default this new security group does not allow remote connections from your local machine to the resources which it secures, so you you need to explicitly grant remote access.
At this point your Security Group should now permit remote connections to any PostgreSQL instance secured by this security group.
By default, Amazon RDS provides a set of parameter group configurations for basic database operations. Unfortunately these do not enable all the necessary features that are needed for Debezium to perform its change data capture operations, most notably logical replication. If you have already created a custom parameter group for your version of PostgreSQL, then you can skip this section. If you have not, this will walk you through how to copy and customize the default configuration groups for our needs.
At this point all we've done is clone the default parameter group for a given version of PostgreSQL into our own. We still need to make parameter modifications to support the features we need in order for Debezium to work properly. You should be able to click on the name of your parameter group and it should take you to a tabular screen where each parameter is listed, its current configured value, a description of the parameter and other pertinent information. At the top of this tabular layout is a search box we're going to use to quickly locate and edit parameters.
Click the Edit parameters
button in the top right and then click in the search box.
rds.logical_replication
and set its value to 1
.log_replication_commands
and set its value to 1
.log_statement
and set its value to all
.Once you've made these changes click Save changes
to persist the parameter changes to your custom parameter group.
The latest RDS piece of setup we need to do is to actually install our desired PostgreSQL instance.
This is where all the magic happens where we put tie together all the pieces of the prior configuration/setup we've done and how that interacts with our new RDS PostgreSQL environment.
Feel free to customize any other database configuration options you want but they're entirely optional and defaults are perfectly acceptable. Once you are satisfied with your configuration, click Create database and wait a few minutes while your instance is configured, built, and brought online for you.
In order to connect to your Amazon RDS PostgreSQL instance, you'll need to use the fully qualified endpoint name. In order to determine your endpoint:
When you run your JVM process you either need to provide these VM options manually, provide them as a part of the exported environment or manually modify TestHelper#defaultJdbcConfig()
specifying these values directly before running the tests.
database.dbname=postgres
database.hostname=<your amazon instance endpoint>
database.user=<name of RDS master user, by default this is postgres>
database.password=<your RDS master password>
If you're interested in watching the logs of your PostgreSQL instance if you configured the optional database parameters.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。