Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gBvkb-0005N3-9r for pgsql-admin@arkaria.postgresql.org; Mon, 15 Oct 2018 05:49:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gBvkZ-0001Pv-In for pgsql-admin@arkaria.postgresql.org; Mon, 15 Oct 2018 05:49:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gBvkZ-0001Pm-1o for pgsql-admin@lists.postgresql.org; Mon, 15 Oct 2018 05:49:07 +0000 Received: from mail-oln040092254066.outbound.protection.outlook.com ([40.92.254.66] helo=APC01-PU1-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gBvkV-00084s-6K for pgsql-admin@lists.postgresql.org; Mon, 15 Oct 2018 05:49:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uD5LHIJVCREkNqdWyZW7b0/1gUCA+8USOPndPi0T0oU=; b=jUzOqXrftV9oh8pwQvG2gNWABJT6JkmeV3ScL6mMe9c8NV4a2I92F6EUpf7GP8vi9mUXzWcHBU79/b2FSBPvEKfR3P88sdkIDAS9sBA5SCEVMlDkGINh/SFJc5s4PzaOqUH669/qgNGvacJBOSUhPsxxmt1GZW1IxFheSaEQpHqPJ8/FgLeQzg7aHr339Z7yUODGPnZ+Vdtw94pS8RNaMrQZo8gHlFHDUeX9Vhi90Gu2MW9MNbY3gVG3K4ckb4gw0KgvOc7FE2JEBAWucUbhijVLF8AqHLAonqxXZufWDowCzrdYJkV68BTT9XiCcbaz+zEi2sAxXi2HBezNOyeESg== Received: from HK2APC01FT033.eop-APC01.prod.protection.outlook.com (10.152.248.53) by HK2APC01HT004.eop-APC01.prod.protection.outlook.com (10.152.248.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.12; Mon, 15 Oct 2018 05:48:53 +0000 Received: from MA1PR0101MB1687.INDPRD01.PROD.OUTLOOK.COM (10.152.248.52) by HK2APC01FT033.mail.protection.outlook.com (10.152.248.190) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.12 via Frontend Transport; Mon, 15 Oct 2018 05:48:53 +0000 Received: from MA1PR0101MB1687.INDPRD01.PROD.OUTLOOK.COM ([fe80::906a:8c91:fc33:a68b]) by MA1PR0101MB1687.INDPRD01.PROD.OUTLOOK.COM ([fe80::906a:8c91:fc33:a68b%4]) with mapi id 15.20.1228.027; Mon, 15 Oct 2018 05:48:53 +0000 From: soumitra bhandary To: Mark Kirkwood , "pgsql-admin@lists.postgresql.org" Subject: Re: Null value returned by function pg_last_wal_receive_lsn() inLogical Replication Thread-Topic: Null value returned by function pg_last_wal_receive_lsn() inLogical Replication Thread-Index: AQHUZC4IuxUsllsdlEuc7f5NcrvWjqUfzEP7 Date: Mon, 15 Oct 2018 05:48:53 +0000 Message-ID: References: <1539179022328-0.post@n3.nabble.com>,<053b174e-b186-86f9-b0cb-1d80e6fb236e@catalyst.net.nz> In-Reply-To: <053b174e-b186-86f9-b0cb-1d80e6fb236e@catalyst.net.nz> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:0429CC0106056CF5F8D933AA11972D128A2787097A8D3B634E3467F05D69A0A0;UpperCasedChecksum:2765C6411D8F17328666B100F3FD193365FC327CDEAF8312DE4B8256DC937CDA;SizeAsReceived:7343;Count:46 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [MSwvmwrGejPwOABJnY1tbdiyZJLDe5bn] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;HK2APC01HT004;6:3wbn+55Nkx4Rg8xz/LBs8GtmJl49Wg/nS2vdVwku2Ac1HD/LtSTsLMQZDurxng/QtA9Yw34VG75MVJj1aSlqNC2kXN7KCRe/0K98kje7KC07kuIZ2eurFRg9Gn4VMKb+VImZbpvsQqL0pjRfhoM42I+BT+Gx3kVpfx79rSTHA+dyqT0+dcb4kaAPfKirxgW/KcxawfttR+WHI2SDqBeJ2Sf7OhgzgTQ3egG63NtGhzBB6ofEdPWmpvK7hx/bqetou5R7VGYcegWkiK12H9C3LSijHxAEmayabQ5vSNGiHVL/crrCGk4aeIbGjuYIc1k3PwY2kDWjFPqgALd7DDqY59rjoN2P9BYZWSRClH8UDT9mZT12b0qM8Ed0zeC5akakFj/jG0HkV4w2IevZgc9j4MoI12kYqvV55QtUcMvdjnPnFQKPDT3lkjfU+1OIbPuaAhd3L3UdK1a9AYC/N26TqA==;5:q6MSuaK2DgwP7jG+ez8NBNN7JnZWGkQb7hcAK3ye6i/MKXdtd9MhHWKis36EKp8Ryoa/camd05f5pV1UZvDGjlyhlaHY2OmRVLFn6wBydBYGvs0FqeWTww2S4LpW37iV7bVM5umEo42oChk2coHUim6AJSCi0RMrTBPGu8vUt3E=;7:cypzvlIIOxtZJO5YzWerfuKx35YccotfOt/2e9KvEi1MfktDILDPEAMg5MZuKJ7YnUjwUSDV1FDYbOnyF5E1epap2F9J018SUDLtRWWU2XXHYwkwH1C4co7XKtyxX3kyetrZb6fsw21QTWdQidg+sba0rOLg9SFDnIAxGlf3+L4cH33SSDUaTKwbpt+wd5ewKXSiKkTCQb83bFyx8ydryChQDU8lTL1tMai1QOZmSHWJRjRZ5QlBtbMZTdAJnwjZ x-incomingheadercount: 46 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1603101475)(1601125500)(1701031045);SRVR:HK2APC01HT004; x-ms-traffictypediagnostic: HK2APC01HT004: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(4566010)(82015058);SRVR:HK2APC01HT004;BCL:0;PCL:0;RULEID:;SRVR:HK2APC01HT004; x-microsoft-antispam-message-info: ILeyzG/TFpWE11Wm8hJ1mtuXiJx14ScDz5uERxbutqJ0NzOgiawhpmRomndlnexX Content-Type: multipart/alternative; boundary="_000_MA1PR0101MB168717FC2FD46C905203B04FE0FD0MA1PR0101MB1687_" MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-Network-Message-Id: 7dfc4e0e-aded-4a70-abcc-08d63261e3a5 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Oct 2018 05:48:53.0894 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2APC01HT004 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_MA1PR0101MB168717FC2FD46C905203B04FE0FD0MA1PR0101MB1687_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 ship= ping is involved here . Hope this clarified your queries . Thanks , Soumitra ________________________________ From: Mark Kirkwood 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() inLo= gical 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.ht= ml 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=3D# 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.ht= ml > --_000_MA1PR0101MB168717FC2FD46C905203B04FE0FD0MA1PR0101MB1687_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
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 ship= ping is involved here . 

Hope this clarified your queries . 


Thanks , 
Soumitra 

From: Mark Kirkwood <mar= k.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-replicatio= n-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=3D# SELECT * FROM pg_stat_subscription;
  subid | subname | pid  | relid | received_lsn |
last_msg_send_time       |   &= nbsp; last_msg_receipt_time     |
latest_end_lsn |        latest_end_time<= br> -------+---------+------+-------+--------------+-------= ------------------------+-------------------------------+----------= ------+-------------------------------
  16409 | pgbench | 8840 |       | = 0/51EB3A20   | 2018-10-15
15:16:38.501061+13 | 2018-10-15 15:16:38.501103+13 | 0/51EB3A20&nbs= p;    |
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
>


--_000_MA1PR0101MB168717FC2FD46C905203B04FE0FD0MA1PR0101MB1687_--