Re: [HACKERS] Re: [COMMITTERS] pgsql: Use LEFT JOINs in some system views in case referenced row doesn

2016-09-12 Thread Michael Paquier
On Mon, Sep 12, 2016 at 9:08 PM, Tom Lane wrote: > Michael Paquier writes: >> On Mon, Sep 12, 2016 at 4:19 PM, Simon Riggs wrote: >>> Why would we need to backpatch this commit? > >> You are right there is no need to get that into 9.6. Sorry for the mistake. > > Oh, that's my fault, I'd incorrec

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use LEFT JOINs in some system views in case referenced row doesn

2016-09-12 Thread Tom Lane
Michael Paquier writes: > On Mon, Sep 12, 2016 at 4:19 PM, Simon Riggs wrote: >> Why would we need to backpatch this commit? > You are right there is no need to get that into 9.6. Sorry for the mistake. Oh, that's my fault, I'd incorrectly remembered this commit as having been further back than

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use LEFT JOINs in some system views in case referenced row doesn

2016-09-12 Thread Michael Paquier
On Mon, Sep 12, 2016 at 4:59 PM, Simon Riggs wrote: > On 12 September 2016 at 08:28, Michael Paquier > wrote: >> On Mon, Sep 12, 2016 at 4:19 PM, Simon Riggs wrote: >>> On 12 September 2016 at 03:27, Michael Paquier >>> wrote: >>> So I'd propose the attached for 9.6 and HEAD. >>> >>> The $

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use LEFT JOINs in some system views in case referenced row doesn

2016-09-12 Thread Simon Riggs
On 12 September 2016 at 08:28, Michael Paquier wrote: > On Mon, Sep 12, 2016 at 4:19 PM, Simon Riggs wrote: >> On 12 September 2016 at 03:27, Michael Paquier >> wrote: >> >>> So I'd propose the attached for 9.6 and HEAD. >> >> The $OP commit was against HEAD only, not against 9.6 >> >> Why would

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use LEFT JOINs in some system views in case referenced row doesn

2016-09-12 Thread Michael Paquier
On Mon, Sep 12, 2016 at 4:19 PM, Simon Riggs wrote: > On 12 September 2016 at 03:27, Michael Paquier > wrote: > >> So I'd propose the attached for 9.6 and HEAD. > > The $OP commit was against HEAD only, not against 9.6 > > Why would we need to backpatch this commit? You are right there is no nee

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use LEFT JOINs in some system views in case referenced row doesn

2016-09-12 Thread Simon Riggs
On 12 September 2016 at 03:27, Michael Paquier wrote: > So I'd propose the attached for 9.6 and HEAD. The $OP commit was against HEAD only, not against 9.6 Why would we need to backpatch this commit? -- Simon Riggshttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Suppor

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use LEFT JOINs in some system views in case referenced row doesn

2016-09-11 Thread Simon Riggs
On 12 September 2016 at 03:38, Tom Lane wrote: > On reflection, maybe s/walsender/WAL sender/? It doesn't look like > we really use the word "walsender" in user-facing docs. There are already * 3 user messages referring to walsender and 2 referring to walreceiver * multiple references in the do

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use LEFT JOINs in some system views in case referenced row doesn

2016-09-11 Thread Michael Paquier
On Mon, Sep 12, 2016 at 11:38 AM, Tom Lane wrote: > Michael Paquier writes: >> Indeed, and the query field does not have much more meaning for a WAL >> sender. So I'd propose the attached for 9.6 and HEAD. I have thought >> about reporting that to pgstat in StartReplication(), but as there is >>

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use LEFT JOINs in some system views in case referenced row doesn

2016-09-11 Thread Tom Lane
Michael Paquier writes: > Indeed, and the query field does not have much more meaning for a WAL > sender. So I'd propose the attached for 9.6 and HEAD. I have thought > about reporting that to pgstat in StartReplication(), but as there is > some error handling there I'd think that WalSndLoop() is

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use LEFT JOINs in some system views in case referenced row doesn

2016-09-11 Thread Michael Paquier
On Mon, Sep 12, 2016 at 10:16 AM, Stephen Frost wrote: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> Michael Paquier writes: >> > On Sun, Sep 11, 2016 at 5:21 AM, Tom Lane wrote: >> >> The fact that the pg_stat_replication view does show walsender processes >> >> seems like possibly a reasonable a

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use LEFT JOINs in some system views in case referenced row doesn

2016-09-11 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Michael Paquier writes: > > On Sun, Sep 11, 2016 at 5:21 AM, Tom Lane wrote: > >> The fact that the pg_stat_replication view does show walsender processes > >> seems like possibly a reasonable argument for not showing them in > >> pg_stat_activity. But we

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use LEFT JOINs in some system views in case referenced row doesn

2016-09-11 Thread Tom Lane
Michael Paquier writes: > On Sun, Sep 11, 2016 at 5:21 AM, Tom Lane wrote: >> The fact that the pg_stat_replication view does show walsender processes >> seems like possibly a reasonable argument for not showing them in >> pg_stat_activity. But we'd have to do some rejiggering of the view >> def

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use LEFT JOINs in some system views in case referenced row doesn

2016-09-11 Thread Michael Paquier
On Sun, Sep 11, 2016 at 5:21 AM, Tom Lane wrote: > The fact that the pg_stat_replication view does show walsender processes > seems like possibly a reasonable argument for not showing them in > pg_stat_activity. But we'd have to do some rejiggering of the view > definition to make that happen. W

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use LEFT JOINs in some system views in case referenced row doesn

2016-09-10 Thread Tom Lane
I wrote: > I looked into this a little. There are at least three things we could > do here: > 1. Decide that showing walsenders is a good thing. I'm not really > sure why it isn't -- for example, we could take the trouble to display > the current replication command as the walsender's activity. >

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use LEFT JOINs in some system views in case referenced row doesn

2016-09-10 Thread Tom Lane
I wrote: > Fujii Masao writes: >> On Sat, Aug 20, 2016 at 6:13 AM, Tom Lane wrote: >>> Use LEFT JOINs in some system views in case referenced row doesn't exist. >> This change causes pg_stat_activity to report the "bogus" information about >> walsenders as follows. > Hmm ... but if we want to e

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use LEFT JOINs in some system views in case referenced row doesn

2016-09-09 Thread Tom Lane
Fujii Masao writes: > On Sat, Aug 20, 2016 at 6:13 AM, Tom Lane wrote: >> Use LEFT JOINs in some system views in case referenced row doesn't exist. > This change causes pg_stat_activity to report the "bogus" information about > walsenders as follows. Hmm ... but if we want to exclude walsenders

[HACKERS] Re: [COMMITTERS] pgsql: Use LEFT JOINs in some system views in case referenced row doesn

2016-09-09 Thread Fujii Masao
On Sat, Aug 20, 2016 at 6:13 AM, Tom Lane wrote: > Use LEFT JOINs in some system views in case referenced row doesn't exist. > > In particular, left join to pg_authid so that rows in pg_stat_activity > don't disappear if the session's owning user has been dropped. > Also convert a few joins to pg_