On Sat, Aug 20, 2016 at 6:13 AM, Tom Lane <t...@sss.pgh.pa.us> 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_database to left joins, in the same spirit, > though that case might be harder to hit. We were doing this in other > views already, so it was a bit inconsistent that these views didn't.
This change causes pg_stat_activity to report the "bogus" information about walsenders as follows. $ ps aux | grep 75076 postgres 75076 0.0 0.0 2608252 1364 ?? Ss 2:41AM 0:00.07 postgres: wal sender process postgres [local] streaming 0/3000140 =# SELECT * FROM pg_stat_activity; -[ RECORD 1 ]----+-------------------------------- datid | 0 datname | (null) pid | 75076 usesysid | 10 usename | postgres application_name | sby1 client_addr | (null) client_hostname | (null) client_port | -1 backend_start | 2016-09-10 02:41:24.568313+09 xact_start | (null) query_start | (null) state_change | 2016-09-10 02:41:24.570135+09 wait_event_type | (null) wait_event | (null) state | idle backend_xid | (null) backend_xmin | (null) query | I think that this information is confusing and should not exist in pg_stat_activity. Regards, -- Fujii Masao -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers