Skip to content

pg_promoter

pg promoter is simplified clustering module based on bgworker.

pg_promoter · pg promoter is simplified clustering module based on bgworker.

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
101597pg_promoterpg_promoter1.0ADMINUnknownC

Usage

Sources:

pg_promoter is an early background-worker prototype that runs only on a standby, polls the primary, and promotes locally after a configured number of failed probes. It does not provide a complete consensus, quorum, or fencing system.

Core Workflow

Install the library on a disposable standby, configure it for preloading, and restart:

shared_preload_libraries = 'pg_promoter'
pg_promoter.keepalives_time = 5
pg_promoter.keepalives_count = 3
pg_promoter.primary_conninfo = 'host=primary port=5432 dbname=postgres'

The source-code spellings are keepalives_time and keepalives_count; use those plural forms even though the README examples use singular names. The worker promotes after consecutive connection failures reach the configured count.

Important Settings

  • pg_promoter.primary_conninfo is the libpq connection string used to probe the primary.
  • pg_promoter.keepalives_time is the polling interval in seconds.
  • pg_promoter.keepalives_count is the failed-probe threshold before promotion.

Requirements and Caveats

  • The reviewed control, registry, or catalog evidence identifies version 1.0.
  • The control file marks the extension as relocatable.
  • This is a preload-only worker; the reviewed repository does not provide extension SQL.
  • Network failure is not proof that the old primary is down. Without external fencing this design can create split brain and data loss.
  • The code uses an old trigger-file promotion path and PostgreSQL internals. Treat it as historical prototype source and test only against the server generation it was written for.

Table reader