From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Don't leave pg_hba and pg_ident data lying around in running bac |
Date: | 2015-07-01 22:55:48 |
Message-ID: | E1ZAQuy-00072J-7G@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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 e5e2fc842c418432 and 7c45e3a3c682f855). 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.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/1e24cf645d24aab3ea39a9d259897fd0cae4e4b6
Modified Files
--------------
src/backend/libpq/hba.c | 8 +++++---
src/backend/utils/init/postinit.c | 13 +++++++++++++
2 files changed, 18 insertions(+), 3 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2015-07-02 01:37:03 | pgsql: Make use of xlog_internal.h's macros in WAL-related utilities. |
Previous Message | Tom Lane | 2015-07-01 22:08:05 | pgsql: Make sampler_random_fract() actually obey its API contract. |