aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/array_userfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-10-16 14:57:14 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2018-10-16 14:57:14 -0400
commit2c300c680767a45450bf7afa4075095f40502dc4 (patch)
treed6911de48b4bada82031b19df2581604fb2f8a09 /src/backend/utils/adt/array_userfuncs.c
parentf7a953c2d870185499faaabd06983526a83eb387 (diff)
downloadpostgresql-2c300c680767a45450bf7afa4075095f40502dc4.tar.gz
postgresql-2c300c680767a45450bf7afa4075095f40502dc4.zip
Be smarter about age-counter overflow in formatting.c caches.
The previous code here simply threw away whatever it knew about cache entry ages whenever a counter overflow occurred. Since the counter is int width and will be bumped once per format function execution, overflows are not really so rare as to not be worth thinking about. Instead, let's deal with the situation by halving all the age values, essentially rescaling the age metric. In that way, we retain a pretty accurate (if not quite perfect) idea of which entries are oldest.
Diffstat (limited to 'src/backend/utils/adt/array_userfuncs.c')
0 files changed, 0 insertions, 0 deletions