Don't leave pg_hba and pg_ident data lying around in running backends.
Free the contexts holding this data after we're done using it, by the expedient of attaching them to the PostmasterContext which we were already taking care to delete (and where, indeed, this data used to live before commits e5e2fc84 and 7c45e3a3). This saves a probably-usually-negligible amount of space per running backend. It also avoids leaving potentially-security-sensitive data lying around in memory in processes that don't need it. You'd have to be unusually paranoid to think that that amounts to a live security bug, so I've not gone so far as to forcibly zero the memory; but there surely isn't a good reason to keep this data around. Arguably this is a memory management bug in the aforementioned commits, but it doesn't seem important enough to back-patch.
Showing
Please register or sign in to comment