Re: Session WAL activity - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Session WAL activity
Date
Msg-id 20191206015714.GH121835@paquier.xyz
Whole thread Raw
In response to Re: Session WAL activity  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Responses Re: Session WAL activity  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Re: Session WAL activity  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
On Thu, Dec 05, 2019 at 12:23:40PM +0300, Konstantin Knizhnik wrote:
> Concerning keeping PGPROC size as small as possible, I agree that it is
> reasonable argument.
> But even now it is very large (816 bytes) and adding extra 8 bytes will
> increase it on less than 1%.

It does not mean that we should add all kind of things to PGPROC as
that's a structure sensitive enough already.  By the way, why do you
assume that 8-byte reads are always safe and atomic in the patch?

> Right now pg_stat_activity also accessing PGPROC to obtain wait event
> information and also not taking any locks.
> So it can wrongly report backend status. But I never heard that somebody
> complains about it.

Please see pgstat.h, close to pgstat_report_wait_start().
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Removal of support for OpenSSL 0.9.8 and 1.0.0
Next
From: Dilip Kumar
Date:
Subject: Re: [HACKERS] Block level parallel vacuum