aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeHash.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-04-14 07:27:44 +0900
committerMichael Paquier <michael@paquier.xyz>2023-04-14 07:27:44 +0900
commita28269708844246fb1ec00a536b391cac0a64972 (patch)
treeeb22c55a2ce45d67b16f2835bb7dd89e6b54672a /src/backend/executor/nodeHash.c
parent0981846b9c3ab1dcc351798dcae6a2e35872a6c3 (diff)
downloadpostgresql-a28269708844246fb1ec00a536b391cac0a64972.tar.gz
postgresql-a28269708844246fb1ec00a536b391cac0a64972.zip
Remove code in charge of freeing regexps generation by Lab.c
bea3d7e has redesigned the regexp engine so as all the allocations go through palloc() with a dedicated memory context. hba.c had to cope with the past memory management logic by going through all the HBA and ident lines generated, then directly free all the regexps found in AuthTokens to ensure that no leaks would happen. Such leaks could happen for example in the postmaster after a SIGHUP, in the event of an HBA and/or ident reload failure where all the new content parsed must be discarded, including all the regexps that may have been compiled. Now that regexps are palloc()'d in their own memory context, MemoryContextDelete() is enough to ensure that all the compiled regexps are properly gone. Simplifying this logic in hba.c has the effect to only remove code. Most of it is new in v16, except the part for regexps compiled in ident entries for the system username, so doing this cleanup now rather than when v17 opens for business will reduce future diffs with the upcoming REL_16_STABLE. Some comments were incorrect since bea3d7e, now fixed to reflect the reality. Reviewed-by: Bertrand Drouvot, Álvaro Herrera Discussion: https://postgr.es/m/ZDdJ289Ky2qEj4h+@paquier.xyz
Diffstat (limited to 'src/backend/executor/nodeHash.c')
0 files changed, 0 insertions, 0 deletions