Thread: [HACKERS] Incorrect documentation about pg_stat_activity

[HACKERS] Incorrect documentation about pg_stat_activity

From
Yugo Nagata
Date:
Hi,

In the documentation[1], there is the following description:
"pg_stat_activity does not show an entry for the Startup process"

However, the current pg_stat_activity show startup process's entry.

postgres=# select pid, backend_type from pg_stat_activity ; pid  |   backend_type    
-------+-------------------27314 | client backend27103 | startup27113 | background writer27112 | checkpointer27115 |
walreceiver
(5 rows)

Attached is a patch for the documentation fix.

Regards,

[1]
26.5.3. Administrator's Overview
https://www.postgresql.org/docs/10/static/hot-standby.html#hot-standby-admin


-- 
Yugo Nagata <nagata@sraoss.co.jp>



Re: [HACKERS] Incorrect documentation about pg_stat_activity

From
Kuntal Ghosh
Date:
On Wed, Jun 21, 2017 at 6:05 PM, Yugo Nagata <nagata@sraoss.co.jp> wrote:
>
> Attached is a patch for the documentation fix.
>
Please attach the patch as well. :-)


-- 
Thanks & Regards,
Kuntal Ghosh
EnterpriseDB: http://www.enterprisedb.com



Re: [HACKERS] Incorrect documentation about pg_stat_activity

From
Yugo Nagata
Date:
On Wed, 21 Jun 2017 19:08:35 +0530
Kuntal Ghosh <kuntalghosh.2007@gmail.com> wrote:

> On Wed, Jun 21, 2017 at 6:05 PM, Yugo Nagata <nagata@sraoss.co.jp> wrote:
> >
> > Attached is a patch for the documentation fix.
> >
> Please attach the patch as well. :-)

I'm sorry, I forgot it. I attahed this.

> 
> 
> -- 
> Thanks & Regards,
> Kuntal Ghosh
> EnterpriseDB: http://www.enterprisedb.com
> 
> 
> -- 
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers


-- 
Yugo Nagata <nagata@sraoss.co.jp>

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

Re: [HACKERS] Incorrect documentation about pg_stat_activity

From
Simon Riggs
Date:
On 21 June 2017 at 16:15, Yugo Nagata <nagata@sraoss.co.jp> wrote:
> On Wed, 21 Jun 2017 19:08:35 +0530
> Kuntal Ghosh <kuntalghosh.2007@gmail.com> wrote:
>
>> On Wed, Jun 21, 2017 at 6:05 PM, Yugo Nagata <nagata@sraoss.co.jp> wrote:
>> >
>> > Attached is a patch for the documentation fix.
>> >
>> Please attach the patch as well. :-)
>
> I'm sorry, I forgot it. I attahed this.

Thanks, will apply.

-- 
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Re: [HACKERS] Incorrect documentation about pg_stat_activity

From
Yugo Nagata
Date:
On Wed, 21 Jun 2017 16:18:50 +0200
Simon Riggs <simon@2ndquadrant.com> wrote:

> On 21 June 2017 at 16:15, Yugo Nagata <nagata@sraoss.co.jp> wrote:
> > On Wed, 21 Jun 2017 19:08:35 +0530
> > Kuntal Ghosh <kuntalghosh.2007@gmail.com> wrote:
> >
> >> On Wed, Jun 21, 2017 at 6:05 PM, Yugo Nagata <nagata@sraoss.co.jp> wrote:
> >> >
> >> > Attached is a patch for the documentation fix.
> >> >
> >> Please attach the patch as well. :-)
> >
> > I'm sorry, I forgot it. I attahed this.
> 
> Thanks, will apply.

Thanks, too.

> 
> -- 
> Simon Riggs                http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Yugo Nagata <nagata@sraoss.co.jp>



Re: [HACKERS] Incorrect documentation about pg_stat_activity

From
Ashutosh Bapat
Date:
On Wed, Jun 21, 2017 at 7:48 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> On 21 June 2017 at 16:15, Yugo Nagata <nagata@sraoss.co.jp> wrote:
>> On Wed, 21 Jun 2017 19:08:35 +0530
>> Kuntal Ghosh <kuntalghosh.2007@gmail.com> wrote:
>>
>>> On Wed, Jun 21, 2017 at 6:05 PM, Yugo Nagata <nagata@sraoss.co.jp> wrote:
>>> >
>>> > Attached is a patch for the documentation fix.
>>> >
>>> Please attach the patch as well. :-)
>>
>> I'm sorry, I forgot it. I attahed this.
>
> Thanks, will apply.

The patch is adjusting documentation for the observed behaviour. But I
don't see a justification as to why the observed behaviour is correct
one? Was there a commit which allowed startup process to be part of
pg_stat_activity but forgot to update the documentation or the current
behaviour is unintentional and probably needs to be fixed?

-- 
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company



Re: [HACKERS] Incorrect documentation about pg_stat_activity

From
Yugo Nagata
Date:
On Thu, 22 Jun 2017 14:14:53 +0530
Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> wrote:

> On Wed, Jun 21, 2017 at 7:48 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> > On 21 June 2017 at 16:15, Yugo Nagata <nagata@sraoss.co.jp> wrote:
> >> On Wed, 21 Jun 2017 19:08:35 +0530
> >> Kuntal Ghosh <kuntalghosh.2007@gmail.com> wrote:
> >>
> >>> On Wed, Jun 21, 2017 at 6:05 PM, Yugo Nagata <nagata@sraoss.co.jp> wrote:
> >>> >
> >>> > Attached is a patch for the documentation fix.
> >>> >
> >>> Please attach the patch as well. :-)
> >>
> >> I'm sorry, I forgot it. I attahed this.
> >
> > Thanks, will apply.
> 
> The patch is adjusting documentation for the observed behaviour. But I
> don't see a justification as to why the observed behaviour is correct
> one? Was there a commit which allowed startup process to be part of
> pg_stat_activity but forgot to update the documentation or the current
> behaviour is unintentional and probably needs to be fixed?

I confirmed the pg_stat_activity documentation and this says "startup" 
can be backend_type column's value, so I believe the behaviour is intentional.

https://www.postgresql.org/docs/10/static/monitoring-stats.html#pg-stat-activity-view

> 
> -- 
> Best Wishes,
> Ashutosh Bapat
> EnterpriseDB Corporation
> The Postgres Database Company


-- 
Yugo Nagata <nagata@sraoss.co.jp>



Re: [HACKERS] Incorrect documentation about pg_stat_activity

From
Simon Riggs
Date:
On 21 June 2017 at 15:18, Simon Riggs <simon@2ndquadrant.com> wrote:
> On 21 June 2017 at 16:15, Yugo Nagata <nagata@sraoss.co.jp> wrote:
>> On Wed, 21 Jun 2017 19:08:35 +0530
>> Kuntal Ghosh <kuntalghosh.2007@gmail.com> wrote:
>>
>>> On Wed, Jun 21, 2017 at 6:05 PM, Yugo Nagata <nagata@sraoss.co.jp> wrote:
>>> >
>>> > Attached is a patch for the documentation fix.
>>> >
>>> Please attach the patch as well. :-)
>>
>> I'm sorry, I forgot it. I attahed this.
>
> Thanks, will apply.

Done, thanks

-- 
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services