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 1gBsX1-0004gh-P8 for pgsql-admin@arkaria.postgresql.org; Mon, 15 Oct 2018 02:22:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gBsX0-0000Ch-0p for pgsql-admin@arkaria.postgresql.org; Mon, 15 Oct 2018 02:22:54 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gBsWz-0000Ca-In for pgsql-admin@lists.postgresql.org; Mon, 15 Oct 2018 02:22:53 +0000 Received: from cat-porwal-prod-mail1.catalyst.net.nz ([2404:130:4080::4]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gBsWu-0001pt-PY for pgsql-admin@lists.postgresql.org; Mon, 15 Oct 2018 02:22:51 +0000 Received: from [IPv6:2406:e001:b7c:1:74e4:2a2f:5cd8:9650] (unknown [IPv6:2406:e001:b7c:1:74e4:2a2f:5cd8:9650]) (Authenticated sender: mark.kirkwood@catalyst.net.nz) by cat-porwal-prod-mail1.catalyst.net.nz (Postfix) with ESMTPSA id 1065D80BFB for ; Mon, 15 Oct 2018 15:22:39 +1300 (NZDT) Subject: Re: Null value returned by function pg_last_wal_receive_lsn() inLogical Replication To: pgsql-admin@lists.postgresql.org References: <1539179022328-0.post@n3.nabble.com> From: Mark Kirkwood Message-ID: <053b174e-b186-86f9-b0cb-1d80e6fb236e@catalyst.net.nz> Date: Mon, 15 Oct 2018 15:22:34 +1300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1539179022328-0.post@n3.nabble.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Authentication-Results: ORIGINATING; auth=pass smtp.auth=mark.kirkwood@catalyst.net.nz smtp.mailfrom=mark.kirkwood@catalyst.net.nz List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 >