talas-group/04_INFRA_DEPLOIEMENT/Ansible/roles/pg-wal-pull
senke 66471934af Initial commit: Talas Group project management & documentation
Knowledge base of ~80+ markdown files across 14 domains (00-13),
Logseq graph, hardware design files (KiCAD), infrastructure configs,
and talas-wiki static site.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 20:10:41 +02:00
..
files Initial commit: Talas Group project management & documentation 2026-04-04 20:10:41 +02:00
meta Initial commit: Talas Group project management & documentation 2026-04-04 20:10:41 +02:00
tasks Initial commit: Talas Group project management & documentation 2026-04-04 20:10:41 +02:00
templates Initial commit: Talas Group project management & documentation 2026-04-04 20:10:41 +02:00
readme.md Initial commit: Talas Group project management & documentation 2026-04-04 20:10:41 +02:00

Prerequisites

The postgresql servers must have a replication slot dedicated to each server that will save the WAL files.

Configuration

You must define at least one upstream server like this:

pg_wal_pull_upstream:
  - PG_HOST: "center-db-cluster-1-node-1"
    PG_VERSION: 14
    PG_USERNAME: "pitr-pa7"
    PG_PASSWORD: "{{ global_center_pitr_password }}"
    PG_SLOT: "pitr_pa7"
    PG_PORT: 5432				# optional, default is 5432
    WAL_DIR: "/srv/wal/somewhere"          	# optional local receive directory, default is /srv/wal/PG_HOST
    WAL_RETENTION_IN_DAYS: 14			# optional, default is 14 days

The WAL_RETENTION_IN_DAYS define how much time the WAL will be kept, it must be similar to the retention of the last file system snapshot of the actual PGDATA of the postgresql cluster for the PITR to work for this long.

Optional variables

Variable Description Type of variable Sample value
pg_wal_pull_service_user systemd user string nobody
pg_wal_pull_service_group systemd group string nogroup