Adding a Heartbeat Table

Oracle GoldenGate for PostgreSQL supports a heartbeat table configuration, with some limitations regarding the update and purge tasks, which will be pointed out later. Adding a heartbeat table to both the source and target systems is optional but is useful in determining latency issues and to which process in the replication stream such issues may be occurring.

To add a heartbeat table for a database, review the required privileges in the Database Privileges for PostgreSQL and ensure that the correct database privileges are assigned to the Extract or Replicat user.

A schema in the database needs to be created and this should match the name of the schema used for the GGSCHEMA parameter of the GLOBALS file. The schema can be a unique schema that is not the same as the Extract or Replicat user, or can be the same as that user, but should always be reserved for Oracle GoldenGate objects only and should not be part of the user table schemas being replicated.

  1. Using GGSCI, connect to the DSN for the source and target databases.
    GGSCI> DBLOGIN SOURCEDB dsn USERIDALIAS alias
  2. Add the heartbeat table using the GGSCI command.
    GGSCI> ADD HEARTBEATTABLE
    Optionally, for a target only database, one that is used for unidirectional replication only, you can include the TARGETONLY option, which will not create a heartbeat record update function.
    GGSCI> ADD HEARTBEATTABLE TARGETONLY

To learn about heartbeat update and purge functions, see: