pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: soumitra bhandary <soumitra.bhandary@hotmail.com>
To: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: Null value returned by function pg_last_wal_receive_lsn() inLogical Replication
Date: Mon, 15 Oct 2018 05:48:53 +0000
Message-ID: <MA1PR0101MB168717FC2FD46C905203B04FE0FD0@MA1PR0101MB1687.INDPRD01.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <053b174e-b186-86f9-b0cb-1d80e6fb236e@catalyst.net.nz>
References: <MA1PR0101MB1687AEC7E3ACC54F999B6E44E0E70@MA1PR0101MB1687.INDPRD01.PROD.OUTLOOK.COM>
	<1539179022328-0.post@n3.nabble.com>
	<053b174e-b186-86f9-b0cb-1d80e6fb236e@catalyst.net.nz>

Hi Pavan ,

Yes as Mark explained , in logical replication no db server is in recovery mode and replication is happening through Replication slot . So no log shipping is involved here .

Hope this clarified your queries .


Thanks ,
Soumitra
________________________________
From: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
Sent: Monday, October 15, 2018 7:52 AM
To: pgsql-admin@lists.postgresql.org
Subject: Re: Null value returned by function pg_last_wal_receive_lsn() inLogical Replication

I think those functions really only make sense for physical replication.

Looking at the docs e.g:
https://www.postgresql.org/docs/10/static/logical-replication-monitoring.html
they appear to *suggest* that monitoring should be similar...some
clarification there is probably in order!

However they also say to use the pg_stat_subsubscription view to monitor
your logical rep, e.g: here's what my pgbench dataset subscription looks
like:

bench=# SELECT * FROM pg_stat_subscription;
  subid | subname | pid  | relid | received_lsn |
last_msg_send_time       |     last_msg_receipt_time     |
latest_end_lsn |        latest_end_time
-------+---------+------+-------+--------------+-------------------------------+-------------------------------+----------------+-------------------------------
  16409 | pgbench | 8840 |       | 0/51EB3A20   | 2018-10-15
15:16:38.501061+13 | 2018-10-15 15:16:38.501103+13 | 0/51EB3A20     |
2018-10-15 15:16:38.501061+13
(1 row)

Cheers

Mark


On 11/10/18 02:43, pavan95 wrote:
> Hi Soumitra,
>
> Could you please explain the reason behind taking the
> pg_current_xlog_insert_location() & restart_lsn?
>
>
> Regards,
> Pavan
>
>
>
> --
> Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
>

view thread (6+ messages)

Message-ID: <MA1PR0101MB168717FC2FD46C905203B04FE0FD0@MA1PR0101MB1687.INDPRD01.PROD.OUTLOOK.COM>
Permalink:  ../MA1PR0101MB168717FC2FD46C905203B04FE0FD0@MA1PR0101MB1687.INDPRD01.PROD.OUTLOOK.COM/
Also on:    postgresql.org/message-id/MA1PR0101MB168717FC2FD46C905203B04FE0FD0@MA1PR0101MB1687.INDPRD01.PROD.OUTLOOK.COM

 · 

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: pgsql-admin@postgresql.org
  Cc: soumitra.bhandary@hotmail.com, mark.kirkwood@catalyst.net.nz, pgsql-admin@lists.postgresql.org
  Subject: Re: Null value returned by function pg_last_wal_receive_lsn() inLogical Replication
  In-Reply-To: <MA1PR0101MB168717FC2FD46C905203B04FE0FD0@MA1PR0101MB1687.INDPRD01.PROD.OUTLOOK.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