資料庫組態

用於擷取的資料庫軟體

若要從 PostgreSQL 資料庫擷取,Oracle GoldenGate 需要為資料庫安裝 test_decoding 資料庫 Plug-in。依預設,安裝資料庫時可能未安裝此 Plug-in。

確定資料庫伺服器上已安裝 postgresqlversion#-contrib 套裝軟體,如下列範例所示:

sudo yum install postgresql14-contrib

PostgreSQL 資料庫組態檔中的參數

若為 Oracle GoldenGate,請在 PostgreSQL 資料庫組態檔 $PGDATA/postgresql.conf 中設定下列參數:

注意:Oracle GoldenGate 將從主要資料庫擷取的主要 PostgreSQL 資料庫,以及 Oracle GoldenGate 在主要資料庫發生失敗時能夠擷取的任何待命資料庫,都需要進行這些變更。

使用這些指示來管理 PostgreSQL、Amazon Aurora PostgreSQL、PostgreSQL 的 Amazon RDS、PostgreSQL 的 Google AlloyDB 以及 PostgreSQL 的 Google Cloud SQL 的資料庫設定值。

Azure Database for PostgreSQL

針對 PostgreSQL 的 Azure 資料庫設定 Oracle GoldenGate for PostgreSQL Extract 時,必須啟用邏輯解碼並將其設為 LOGICAL。

閱讀 Microsoft 文件,取得相關說明:

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

Azure Database for PostgreSQL 的其他資料庫設定值可以透過資料庫執行處理的「伺服器參數」段落來管理。

若是連線至 PostgreSQL 執行處理的 Azure 資料庫,預設的「Azure 連線安全」設定值需要 SSL 連線。若要遵循這項需求,需要進一步的步驟來支援與 Oracle GoldenGate 的 SSL 連線。

請依照 Configuring SSL Support for PostgreSQL 下列出的內容,瞭解詳細資訊。

適用於 PostgreSQL 的 Amazon Aurora PostgreSQL 和 Amazon RDS

對於 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 命令來避免此錯誤。

Google AlloyDB for PostgreSQL

從 Oracle GoldenGate 21.14 版開始,Oracle GoldenGate 支援 PostgreSQL 版的 Google AlloyDB。設定 Oracle GoldenGate for PostgreSQL Extract for a Google AlloyDB for PostgreSQL 時,必須將 alloydb.logical_decoding configuration 參數 (旗標) 設為 ON。

Google Cloud SQL for PostgreSQL

設定 Oracle GoldenGate for PostgreSQL Extract for a Google Cloud SQL for PostgreSQL 資料庫時,必須設定邏輯解碼,並將 cloudsql.logical_decoding 變數設為 ON 來完成。依照 Google 提供的指示,瞭解如何啟用此資料庫旗標。如需詳細資訊,請參閱 https://cloud.google.com/sql/docs/postgres/flags#postgres-l 。