From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Prevent memory leaks in parseRelOptions(). |
Date: | 2014-08-13 15:36:02 |
Message-ID: | E1XHaao-0003IZ-2x@gemulon.postgresql.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Prevent memory leaks in parseRelOptions().
parseRelOptions() tended to leak memory in the caller's context. Most
of the time this doesn't really matter since the caller's context is
at most query-lifespan, and the function won't be invoked very many times.
However, when testing with CLOBBER_CACHE_RECURSIVELY, the same relcache
entry can get rebuilt a *lot* of times in one query, leading to significant
intraquery memory bloat if it has any reloptions. Noted while
investigating a related report from Tomas Vondra.
In passing, get rid of some Asserts that are redundant with the one
done by deconstruct_array().
As with other patches to avoid leaks in CLOBBER_CACHE testing, it doesn't
really seem worth back-patching this.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/a844c29966d7c0cd6a457e9324f175349bb12df0
Modified Files
--------------
src/backend/access/common/reloptions.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2014-08-14 02:11:22 | pgsql: doc: Remove obsolete set element DSSSL customizations |
Previous Message | Fujii Masao | 2014-08-13 02:04:10 | pgsql: Expose -S option in pg_receivexlog. |