数据库配置

用于捕获的数据库软件

要从 PostgreSQL 数据库捕获,Oracle GoldenGate 要求为数据库安装 test_decoding 数据库插件。安装数据库时,默认情况下可能未安装此插件。

确保数据库服务器上安装了 postgresqlversion#-contrib 软件包,如示例中所示:

sudo yum install postgresql14-contrib

PostgreSQL 数据库配置文件中的参数

对于 Oracle GoldenGate,请在 PostgreSQL 数据库配置文件 $PGDATA/postgresql.conf 中配置以下参数:

注:对于 Oracle GoldenGate 将从中捕获的主 PostgreSQL 数据库以及 Oracle GoldenGate 在主数据库失败时可以从中捕获的任何备用数据库,都需要进行这些更改。

使用这些说明管理 Azure for PostgreSQL、Amazon Aurora PostgreSQL、Amazon RDS for PostgreSQL、Google AlloyDB for PostgreSQL 和 Google Cloud SQL for PostgreSQL 的数据库设置。

适用于 PostgreSQL 的 Azure 数据库

在针对 Azure Database for PostgreSQL 为 PostgreSQL 提取配置 Oracle GoldenGate 时,必须启用逻辑解码并将其设置为 LOGICAL。

有关说明,请阅读 Microsoft 文档:

https://learn.microsoft.com/en-us/azure/postgresql/

Azure Database for PostgreSQL 的其他数据库设置可以通过数据库实例的“服务器参数”部分进行管理。

对于与 Azure Database for PostgreSQL 实例的连接,默认的 Azure 连接安全设置需要 SSL 连接。要满足此要求,需要执行更多步骤来支持与 Oracle GoldenGate 的 SSL 连接。

有关更多信息,请遵循 Configuring SSL Support for PostgreSQL 下列出的内容。

Amazon Aurora PostgreSQL 和 Amazon RDS(适用于 PostgreSQL)

对于 Amazon Aurora PostgreSQL 和 Amazon RDS for PostgreSQL,将在参数组中修改数据库设置。

有关如何编辑新参数组中的数据库设置并将其分配给数据库实例的信息,请查看 Amazon AWS 文档:

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html

限制:

在 Amazon Aurora PostgreSQL 版本 12.17 上,如果执行大写 SHOW 命令,则会报告以下错误:

"ERROR: must be superuser or replication role to run this operation."

必须使用小写 SHOW 命令以避免此错误。

适用于 PostgreSQL 的 Google AlloyDB

从 Oracle GoldenGate 发行版 21.14 开始,Oracle GoldenGate 支持 Google AlloyDB for PostgreSQL。为 Google PostgreSQL 的 PostgreSQL 提取配置 Oracle GoldenGate 时,需要将 alloydb.logical_decoding configuration 参数(标志)设置为 ON。

适用于 PostgreSQL 的 Google Cloud SQL

为 Google Cloud SQL for PostgreSQL 数据库的 Oracle GoldenGate 配置 Oracle GoldenGate 时,必须设置逻辑解码,并通过将 cloudsql.logical_decoding 变量设置为 ON 来完成解码。按照 Google 提供的有关如何启用此数据库标志的说明进行操作。有关更多信息,请参见 https://cloud.google.com/sql/docs/postgres/flags#postgres-l 。