public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tatsuo Ishii <[email protected]>
To: [email protected]
Subject: pgpool: Feature: allow to specify external command to retrieve replicat
Date: Tue, 06 Jan 2026 06:39:49 +0000
Message-ID: <[email protected]> (raw)

Feature: allow to specify external command to retrieve replication delay.

This commit allows to specify an external command to retrieve
replication delay information for streaming replication standby nodes.
This feature is useful when backend database is a PostgreSQL
compatible third-party software which does not provide
pg_stat_replication view.

For this purpose a new GUC variable "replication_delay_source_cmd" is
added. The user provided command accepts replica node identifiers
(e.g, server1:5432 server2:5432), and prints replication delay amount
in seconds or milliseconds to stdout.

Also "replication_delay_source_timeout" GUC variable is added to give
up waiting for the command to finish if it takes long time.

Author: Nadav Shatz <[email protected]>
Reviewed-by: Tatsuo Ishii <[email protected]>
Discussion: https://www.postgresql.org/message-id/CACeKOO2E6cuCOQGFzq8i0%2BpFwi%3DJG4deiapHGkShjMjbn_-6tw%40mail...

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=53844460fea156fbe1eb78a1adb87d65a8247...

Modified Files
--------------
doc.ja/src/sgml/stream-check.sgml                  | 125 ++++++
doc/src/sgml/stream-check.sgml                     |  78 ++++
src/config/pool_config_variables.c                 |  23 +-
src/include/pool_config.h                          |   5 +-
src/sample/pgpool.conf.sample-stream               |  14 +
src/streaming_replication/pool_worker_child.c      | 461 ++++++++++++++++++++-
.../tests/041.external_replication_delay/README    |  59 +++
.../tests/041.external_replication_delay/test.sh   | 409 ++++++++++++++++++
.../041.external_replication_delay/test_parsing.sh |  54 +++
.../test_validation.sh                             | 323 +++++++++++++++
10 files changed, 1545 insertions(+), 6 deletions(-)



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgpool: Feature: allow to specify external command to retrieve replicat
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox