Re: [HACKERS] Function and view to retrieve WAL receiver status

2016-01-07 Thread Michael Paquier
On Fri, Jan 8, 2016 at 4:38 AM, Alvaro Herrera wrote: > Michael Paquier wrote: >> On Thu, Jan 7, 2016 at 1:57 PM, Haribabu Kommi >> wrote: >> > On Wed, Jan 6, 2016 at 8:00 PM, Michael Paquier >> > wrote: >> >> On

Re: [HACKERS] Function and view to retrieve WAL receiver status

2016-01-06 Thread Michael Paquier
On Wed, Jan 6, 2016 at 3:04 PM, Michael Paquier wrote: > Attached is an updated patch. Forgot to update rules.out... -- Michael From 4bc33d1497c302b8669b1f1d9d43f2f806029693 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Fri, 18 Dec 2015

Re: [HACKERS] Function and view to retrieve WAL receiver status

2016-01-06 Thread Haribabu Kommi
On Wed, Jan 6, 2016 at 8:00 PM, Michael Paquier wrote: > On Wed, Jan 6, 2016 at 3:04 PM, Michael Paquier > wrote: >> Attached is an updated patch. > > Forgot to update rules.out... Thanks for the update. Patch looks good to me. I marked it

Re: [HACKERS] Function and view to retrieve WAL receiver status

2016-01-05 Thread Michael Paquier
On Wed, Jan 6, 2016 at 8:14 AM, Haribabu Kommi wrote: > Following are my observations on the latest patch. Thanks for your review. > + If no WAL receiver is present on the server queried, > + a single tuple filled with NULL values is returned instead. > + > > The

Re: [HACKERS] Function and view to retrieve WAL receiver status

2016-01-05 Thread Haribabu Kommi
On Sat, Dec 19, 2015 at 12:54 AM, Michael Paquier wrote: > On Fri, Dec 18, 2015 at 8:39 AM, Robert Haas wrote: >> On Mon, Dec 14, 2015 at 7:23 PM, Michael Paquier >> wrote: >>> On Tue, Dec 15, 2015 at 5:27 AM, Gurjeet

Re: [HACKERS] Function and view to retrieve WAL receiver status

2016-01-05 Thread Michael Paquier
On Tue, Jan 5, 2016 at 7:49 PM, Haribabu Kommi wrote: > On Sat, Dec 19, 2015 at 12:54 AM, Michael Paquier > wrote: >> On Fri, Dec 18, 2015 at 8:39 AM, Robert Haas wrote: >>> On Mon, Dec 14, 2015 at 7:23 PM, Michael

Re: [HACKERS] Function and view to retrieve WAL receiver status

2016-01-05 Thread Haribabu Kommi
On Tue, Jan 5, 2016 at 10:24 PM, Michael Paquier wrote: > On Tue, Jan 5, 2016 at 7:49 PM, Haribabu Kommi > wrote: >> On Sat, Dec 19, 2015 at 12:54 AM, Michael Paquier >> wrote: >>> On Fri, Dec 18, 2015 at 8:39 AM,

Re: [HACKERS] Function and view to retrieve WAL receiver status

2015-12-18 Thread Michael Paquier
On Fri, Dec 18, 2015 at 8:39 AM, Robert Haas wrote: > On Mon, Dec 14, 2015 at 7:23 PM, Michael Paquier > wrote: >> On Tue, Dec 15, 2015 at 5:27 AM, Gurjeet Singh wrote: >>> The function, maybe. But emitting an all-nulls row from a view seems >>>

Re: [HACKERS] Function and view to retrieve WAL receiver status

2015-12-17 Thread Robert Haas
On Mon, Dec 14, 2015 at 7:23 PM, Michael Paquier wrote: > On Tue, Dec 15, 2015 at 5:27 AM, Gurjeet Singh wrote: >> The function, maybe. But emitting an all-nulls row from a view seems >> counter-intuitive, at least when looking at it in context of relational >>

Re: [HACKERS] Function and view to retrieve WAL receiver status

2015-12-14 Thread Michael Paquier
On Tue, Dec 15, 2015 at 5:27 AM, Gurjeet Singh wrote: > The function, maybe. But emitting an all-nulls row from a view seems > counter-intuitive, at least when looking at it in context of relational > database. OK, noted. Any other opinions? -- Michael -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Function and view to retrieve WAL receiver status

2015-12-14 Thread Gurjeet Singh
On Sun, Dec 13, 2015 at 10:15 PM, Michael Paquier wrote: > On Mon, Dec 14, 2015 at 3:09 PM, Gurjeet Singh > wrote: > > On Dec 13, 2015 9:56 PM, "Michael Paquier" > > wrote: > >> If the node has no WAL receiver

[HACKERS] Function and view to retrieve WAL receiver status

2015-12-13 Thread Michael Paquier
Hi all, Currently there is no equivalent of pg_stat_get_wal_senders for the WAL receiver on a node, and it seems that it would be useful to have an SQL representation of what is in shared memory should a WAL receiver be active without going through the ps display for example. So, any opinion

Re: [HACKERS] Function and view to retrieve WAL receiver status

2015-12-13 Thread Gurjeet Singh
On Dec 13, 2015 9:56 PM, "Michael Paquier" wrote: > > If the node has no WAL receiver active, a tuple with NULL values is > returned instead. IMO, in the absence of a WAL receiver the SRF (and the view) should not return any rows.

Re: [HACKERS] Function and view to retrieve WAL receiver status

2015-12-13 Thread Michael Paquier
On Mon, Dec 14, 2015 at 3:09 PM, Gurjeet Singh wrote: > On Dec 13, 2015 9:56 PM, "Michael Paquier" > wrote: >> If the node has no WAL receiver active, a tuple with NULL values is >> returned instead. > > IMO, in the absence of a WAL receiver