From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Monitor repl slot size
Date: Fri, 13 Jul 2018 13:43:59 +0300
Message-ID: <8eef4935-9a04-a70b-21f4-9ef76f1df12c@matrix.gatewaynet.com> (raw)
In-Reply-To: <CAMTZZh1xOq2e47evTaTTeUhz9QsectB7ESo+yn788hS=WtPLEw@mail.gmail.com>
References: <CAMTZZh1xOq2e47evTaTTeUhz9QsectB7ESo+yn788hS=WtPLEw@mail.gmail.com>
On 13/07/2018 13:19, Nicola Contu wrote:
> Hello,
> we used to monitor the replication slot size on postgres 9.6.6 with the following query:
>
> SELECT pg_xlog_location_diff(pg_current_xlog_location(), restart_lsn) FROM pg_replication_slots WHERE slot_name = 'SLOT NAME';
>
> We are moving to postgres 10.4 and we saw the pg_xlog_location_diff is not there anymore.
>
location -> lsn
xlog -> wal
SELECT pg_wal_lsn_diff(pg_current_wal_insert_lsn(), restart_lsn) FROM pg_replication_slots;
> I know we can re-create it following this link : https://github.com/DataDog/integrations-core/issues/907
>
> but, is there any better way to do it? Any replacement for that function on postgres 10?
>
> Thanks a lot,
> Nicola
--
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: achill@matrix.gatewaynet.com
Subject: Re: Monitor repl slot size
In-Reply-To: <8eef4935-9a04-a70b-21f4-9ef76f1df12c@matrix.gatewaynet.com>
References: <CAMTZZh1xOq2e47evTaTTeUhz9QsectB7ESo+yn788hS=WtPLEw@mail.gmail.com> <8eef4935-9a04-a70b-21f4-9ef76f1df12c@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