From: | tgl(at)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix domain_in() bug exhibited by Darcy Buskermolen. |
Date: | 2006-08-04 21:33:36 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
Fix domain_in() bug exhibited by Darcy Buskermolen. The idea of an EState
that's shorter-lived than the expression state being evaluated in it really
doesn't work :-( --- we end up with fn_extra caches getting deleted while
still in use. Rather than abandon the notion of caching expression state
across domain_in calls altogether, I chose to make domain_in a bit cozier
with ExprContext. All we really need for evaluating variable-free
expressions is an ExprContext, not an EState, so I invented the notion of a
"standalone" ExprContext. domain_in can prevent resource leakages by doing
a ReScanExprContext on this rather than having to free it entirely; so we
can make the ExprContext have the same lifespan (and particularly the same
per_query memory context) as the expression state structs.
Modified Files:
--------------
pgsql/src/backend/executor:
execUtils.c (r1.138 -> r1.139)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execUtils.c.diff?r1=1.138&r2=1.139)
pgsql/src/backend/utils/adt:
domains.c (r1.2 -> r1.3)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/domains.c.diff?r1=1.2&r2=1.3)
pgsql/src/include/executor:
executor.h (r1.127 -> r1.128)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/executor.h.diff?r1=1.127&r2=1.128)
pgsql/src/include/nodes:
execnodes.h (r1.157 -> r1.158)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/execnodes.h.diff?r1=1.157&r2=1.158)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2006-08-04 22:20:06 | pgsql: Add some blank lines for formatting. |
Previous Message | User Korryd | 2006-08-04 20:00:53 | edb-debugger - workstation: Adding tracer and profiler plugins |