aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonb_util.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2020-05-13 13:08:12 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2020-05-13 13:08:23 -0400
commit81ca8686305c4c62d723ab224ad5c414f350a3a0 (patch)
tree7b82a5eee2972eee5fd79a55a8c767493bf2c739 /src/backend/utils/adt/jsonb_util.c
parent850196b610d2a1802b4ed7f9f608153a949eda34 (diff)
downloadpostgresql-81ca8686305c4c62d723ab224ad5c414f350a3a0.tar.gz
postgresql-81ca8686305c4c62d723ab224ad5c414f350a3a0.zip
Improve management of SLRU statistics collection.
Instead of re-identifying which statistics bucket to use for a given SLRU on every counter increment, do it once during shmem initialization. This saves a fair number of cycles, and there's no real cost because we could not have a bucket assignment that varies over time or across backends anyway. Also, get rid of the ill-considered decision to let pgstat.c pry directly into SLRU's shared state; it's cleaner just to have slru.c pass the stats bucket number. In consequence of these changes, there's no longer any need to store an SLRU's LWLock tranche info in shared memory, so get rid of that, making this a net reduction in shmem consumption. (That partly reverts fe702a7b3.) This is basically code review for 28cac71bd, so I also cleaned up some comments, removed a dangling extern declaration, fixed some things that should be static and/or const, etc. Discussion: https://postgr.es/m/3618.1589313035@sss.pgh.pa.us
Diffstat (limited to 'src/backend/utils/adt/jsonb_util.c')
0 files changed, 0 insertions, 0 deletions