PGSQL Offline Replica

Offline replica, special replica for offline ETL, interactive queries

Data analysis/ETL/personal interactive queries should be placed on the offline replica when the high online business request load.

  1. pg-test:
  2. hosts:
  3. 10.10.10.11: { pg_seq: 1, pg_role: primary }
  4. 10.10.10.12: { pg_seq: 2, pg_role: replica }
  5. 10.10.10.13: { pg_seq: 2, pg_role: offline } #Define a new offline instance
  6. vars:
  7. pg_cluster: pg-test

Use bin/createpg pg-test to create the cluster. If you have already completed singleton deployment and primary-replica-cluster, you can use bin/createpg 10.10.10.13 to expand the cluster and add an offline replica to the cluster.

Offline replicas do not host the replica service by default, and the offline instance will only host read-only traffic if all instances in the replica service are unavailable. If you have only one primary & one replica, or only one primary, you can set the pg_offline_query flag for an offline instance that also hosts the offline service to be used as a quasi-offline instance.

Last modified 2022-06-04: fii en docs batch 2 (61bf601)