Re: Inefficiency in SLRU stats collection - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Inefficiency in SLRU stats collection
Date
Msg-id 389.1589380963@sss.pgh.pa.us
Whole thread Raw
In response to Re: Inefficiency in SLRU stats collection  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers
Kyotaro Horiguchi <horikyota.ntt@gmail.com> writes:
> AFAICS it is right and the change suggested looks reasonable to me.
> One arguable point might be whether it is right that SlruData holds
> pgstats internal index from the standpoint of modularity.  (It is one
> of the reasons I didn't propose a patch for that..)

Yeah, this is a fair point.  On the other hand, the existing code has
pgstat.c digging into the SLRU control structure, which is as bad or
worse a modularity violation.  Perhaps we could ditch that by having
slru.c obtain and store the integer index which it then passes to
the pgstat.c counter routines, rather than passing a SlruCtl pointer.

I'll have to look at whether 28cac71bd exposed a data structure that
was formerly private, but if it did I'd be VERY strongly inclined
to revert that.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Антон Пацев
Date:
Subject: Ideas about moving live rows to the top of the table
Next
From: Fujii Masao
Date:
Subject: Re: SLRU statistics