aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/numeric.c
diff options
context:
space:
mode:
authorAlexander Korotkov <akorotkov@postgresql.org>2024-08-25 03:21:23 +0300
committerAlexander Korotkov <akorotkov@postgresql.org>2024-08-25 03:21:23 +0300
commitc14d4acb81348a34497b53a19dce2924cc4f6551 (patch)
tree69a399adfa4f0b28c8f31987392973a35bf6df12 /src/backend/utils/adt/numeric.c
parent3890d90c1508125729ed20038d90513694fc3a7b (diff)
downloadpostgresql-c14d4acb81348a34497b53a19dce2924cc4f6551.tar.gz
postgresql-c14d4acb81348a34497b53a19dce2924cc4f6551.zip
Avoid looping over all type cache entries in TypeCacheRelCallback()
Currently when a single relcache entry gets invalidated, TypeCacheRelCallback() has to loop over all type cache entries to find appropriate typentry to invalidate. Unfortunately, using the syscache here is impossible, because this callback could be called outside a transaction and this makes impossible catalog lookups. This is why present commit introduces RelIdToTypeIdCacheHash to map relation OID to its composite type OID. We are keeping RelIdToTypeIdCacheHash entry while corresponding type cache entry have something to clean. Therefore, RelIdToTypeIdCacheHash shouldn't get bloat in the case of temporary tables flood. Discussion: https://postgr.es/m/5812a6e5-68ae-4d84-9d85-b443176966a1%40sigaev.ru Author: Teodor Sigaev Reviewed-by: Aleksander Alekseev, Tom Lane, Michael Paquier, Roman Zharkov Reviewed-by: Andrei Lepikhov, Pavel Borisov
Diffstat (limited to 'src/backend/utils/adt/numeric.c')
0 files changed, 0 insertions, 0 deletions