The following bug has been logged on the website:
Bug reference: 16348
Logged by: Hugh Wang
Email address: hghwng@gmail.com
PostgreSQL version: 12.2
Operating system: Arch Linux
Description:
SUMMARY:
Memory leaked by gui-file.l:ProcessConfig accumulates across repeated SIGHUP
cycles.
ANALYSIS:
When parsing config file, gui-file.l:ProcessConfig sets up memory context.
It invokes guc-file.l:ProcessConfigFileInternal, which is expected to leak
memory. It's okay because the leaked memory will be freed when cleaning up
the context. Next, guc-file.l:ProcessConfigFileInternal associates each
config item with filename by calling guc.c:set_config_option, which calls
guc.c:guc_strdup. However, guc.c:guc_strdup is not aware of the memory
context, and invokes libc.so:strdup directly.