From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Logical replication monitoring
Date: Fri, 10 Aug 2018 16:28:10 +0300
Message-ID: <9d702bb3-9988-dd09-e0fb-f75858665f8b@matrix.gatewaynet.com> (raw)
In-Reply-To: <OF55FA9E73.3D2F6C8B-ON432582E5.0036C1C3-432582E5.00376604@iba.by>
References: <OF55FA9E73.3D2F6C8B-ON432582E5.0036C1C3-432582E5.00376604@iba.by>
On 10/08/2018 13:05, AYahorau@ibagroup.eu wrote:
> Hello PostgreSQL Community!
>
> I configured logical replication for PostgreSQL 10.4 on 2 machines, set wal_level to logical, created a publication on master node and created a subscription on standby node according to the
> PostgreSQL documentation.
> Could you please suggest an approach for replication state monitoring.
>
> According to my experience the monitoring of *pg_stat_subscription *and *pg_publication, pg_replication_slots *unfortunately is not enough for this aim. Moreover standby database does not prohibit
> write operations by default and it can lead to some inconsistency between these databases.
>
> For example a chain of queries as
> *SELECT pg_is_is_recovery()*,
> *SELECT * FROM pg_stat_replication* and
> *SELECT * FROM pg_stat_wal_receiver*
> provide insight into replication state for hot_standby replication.
>
> So is there a reliable way of replication state monitoring for logical replication?
tail_n_mail and look for relevant errors (logical, logical replication worker ... exited with ..., ERROR)
>
>
> Best regards,
> Andrei Yahorau
--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt
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: pgsql-admin@postgresql.org
Cc: achill@matrix.gatewaynet.com, pgsql-admin@lists.postgresql.org
Subject: Re: Logical replication monitoring
In-Reply-To: <9d702bb3-9988-dd09-e0fb-f75858665f8b@matrix.gatewaynet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox