PostgreSQL: Supported Data Types, Objects, and Operations

Oracle GoldenGate for PostgreSQL supports capture and delivery of initial load and transactional data for supported PostgreSQL database versions.

Oracle GoldenGate for PostgreSQL supports the mapping, filtering, and transformation of source data, unless noted otherwise in this document, as well as replicating data derived from other source databases supported by Oracle GoldenGate, into PostgreSQL databases.

Supported Databases

The following are supported databases and limitations for Oracle GoldenGate for PostgreSQL:

High Availability Considerations

Oracle GoldenGate supports capturing change data from PostgreSQL High Availability configuration. This functionality is available only on PostgreSQL database versions 16 and higher. The change data capture can be configured on the primary server or any read-only standby server in the High Availability setup. To avoid possible data-loss and manual intervention in cases of failover, Oracle GoldenGate recommends that the High Availability setup should be configured using synchronous replication.

Refer to Oracle GoldenGate procedures for PostgreSQL High Availability Failover Doc ID 2818379.1 for more details on possible data loss and manual intervention scenarios.

To configure the CDC Extract from a PostgreSQL High Availability setup, perform the following tasks: 1. Extract can be configured to capture data from the primary server or a read-only standby server in the High Availability setup.

  1. When the Extract is configured on one node (primary or standby), the replication slot with the same name should be created on all the other nodes in the High Availability setup at the same time, before starting the data capture.

    1. Use REGISTER EXTRACT command to create the replication slot on one server (where the Extract is configured), as shown in the following example:

      REGISTER EXTRACT exte
    2. Immediately after registering Extract, create the replication slot with the same name. You must use the same replication slot name on all other nodes in the High Availability setup explicitly.

      postgres=# select pg_create_logical_replication_slot('exte_ac6b520cab2871b7', 'test_decoding');
       pg_create_logical_replication_slot
      
      ------------------------------------
       (exte_ac6b520cab2871b7,0/8169E00)
      (1  row)
      2025-01-20T06:58:22Z  INFO    OGG-25355  Successfully created replication slot 'exte_ac6b520cab2871b7' for Extract group 'EXTE' in database 'postgres'.
    3. Connect to the corresponding database and execute the pg_create_logical_replication_slot statement from PSQL. Note: IMPORTANT NOTE FOR REPLICATION SLOT CREATION ON STANDBY: When the replication slot creation is attempted on the read-only standby server (either using REGISTER EXTRACT command or pg_create_logical_replication_slot statement), the operation completes only after some DML (can be any random DML) is executed on any table on the primary server in the high availability setup. Alternatively the heartbeat functionality can be enabled on the primary server, which can cause the required DML activity on the primary, to complete the replication slot creation on the standby server.

  1. ADD TRANDATA or DELETE TRANDATA commands are not supported on any read-only standby server(s) in the PostgreSQL high availability setup. The REPLICA IDENTITY setting of any table on the read-only standby server would be the same as the REPLICA IDENTITY setting of the corresponding table on the primary server.

  2. To use the heartbeat functionality when the data capture is configured on a read-only standby server, the heartbeat functionality should be enabled on the primary server.

  3. In the case of failover, the extract parameter file should be modified to connect to the desired node (either primary/standby, based on the requirement) to continue the data capture after the failover.

    Example

    Consider a situation, where there are three nodes in the PostgreSQL high availability cluster, with corresponding connection aliases:

    Node1 (current primary) with corresponding connection alias: node1

    Node2 (standby) with corresponding connection alias: node2

    Node3 (standby) with corresponding connection alias: node3

    Before the failover, if the Extract is configured to capture data from one of the nodes (such as node2), then the Extract parameter file would contain an entry similar to the following:

    USERIDALIAS node2

    In case of a failover, to the primary node (node1) goes down and the secondary node (node2) becomes the new primary then there can be two possibilities:

    1. To continue data capture from same node2:

      • No changes are required in the Extract parameter file.

      • Restart the Extract.

    2. To capture the data always from a different node:

      • Change the Extract parameter file to connect to the desired node, such as Node3.

        USERIDALIAS node3
      • Restart the Extract.

Supported PostgreSQL Data Types

Here’s a list of PostgreSQL data types that Oracle GoldenGate supports along with the limitations of this support.

Handling Array Data Type

PostgreSQL supports array of various built-in and UDT types. Starting with Oracle GoldenGate release 26ai, Oracle GoldenGate Extract and Replicat support PostgreSQL array data type of following types:

The real, double, numeric data types support the NaN and Infinity/-Infinity special numeric values.

For more information on data types by databases that support special values, refer to Special Values Supported by Database Data Types.

Both initial load and CDC Extract support these array types.

Note: Initial load Extract does not support PostgreSQL array of time datatype.

Limitations of Support

Non-Supported PostgreSQL Data Types

Oracle GoldenGate for PostgreSQL does not support the following data types:

Supported Objects and Operations for PostgreSQL

Tables, Views, and Materialized Views

Tables to be included for capture and delivery must meet the following requirements and must only include data types listed under Supported PostgreSQL Data Types.

Limitations

Sequences and Identity Columns