pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Masahiko Sawada <masahiko.sawada@2ndquadrant.com>
Cc: tsunakawa.takay@fujitsu.com <tsunakawa.takay@fujitsu.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: SLRU statistics
Date: Wed, 13 May 2020 11:38:15 -0400
Message-ID: <2668.1589384295@sss.pgh.pa.us> (raw)
In-Reply-To: <20200513152846.goee2c5xrly52ga2@development>
References: <20200502000818.nn4kpewiput42bnb@development>
	<49b8ad17-f6d9-a086-a952-ff1fec3ac1b3@oss.nttdata.com>
	<20200502105500.hwhba3d6s3hlrqf6@development>
	<20200502165905.brfxv6dk5vjdbgti@development>
	<976bbb73-a112-de3c-c488-b34b64609793@oss.nttdata.com>
	<b8784fe6-1401-ab35-aa14-d57b5bb8e312@oss.nttdata.com>
	<20200513082159.myflgcs5fnhnujbk@development>
	<b407746a-4fb6-7128-9391-c3765eb44718@oss.nttdata.com>
	<32135.1589379999@sss.pgh.pa.us>
	<fe3332c8-485a-540b-ca34-b024d452a7ae@oss.nttdata.com>
	<20200513152846.goee2c5xrly52ga2@development>

Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
> I think it counts as a variable with "static storage duration" per 6.7.8
> (para 10), see [1]. I wasn't aware of this either, but it probably means
> the memset is unnecessary.
> Also, it seems a bit strange/confusing to handle this differently from
> BgWriterStats. And that worked fine without the init for years ...

Yeah, exactly.

There might be merit in memsetting it if we thought that it could have
become nonzero in the postmaster during a previous shmem cycle-of-life.
But the postmaster really shouldn't be accumulating such counts; and
if it is, then we have a bigger problem, because child processes would
be inheriting those counts via fork.

I think this change is unnecessary and should be reverted to avoid
future confusion about whether somehow it is necessary.

			regards, tom lane





view thread (49+ messages)  latest in thread

Message-ID: <2668.1589384295@sss.pgh.pa.us>
Permalink:  ../2668.1589384295@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2668.1589384295@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tomas.vondra@2ndquadrant.com, masao.fujii@oss.nttdata.com, alvherre@2ndquadrant.com, masahiko.sawada@2ndquadrant.com, tsunakawa.takay@fujitsu.com
  Subject: Re: SLRU statistics
  In-Reply-To: <2668.1589384295@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox