pgsql: Use a fresh copy of query_list when making a second plan in GetC

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Use a fresh copy of query_list when making a second plan in GetC
Date: 2011-09-26 16:45:02
Message-ID: E1R8EIg-0000g6-LF@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Use a fresh copy of query_list when making a second plan in GetCachedPlan.

The code path that tried a generic plan, didn't like it, and then made a
custom plan was mistakenly passing the same copy of the query_list to the
planner both times. This doesn't work too well for nontrivial queries,
since the planner tends to scribble on its input. Diagnosis and fix by
Yamamoto Takashi.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/21fb95da46bce8de3e149707c680d489b8a5ffb0

Modified Files
--------------
src/backend/utils/cache/plancache.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2011-09-26 17:14:18 pgsql: Update obsolete comments.
Previous Message Tom Lane 2011-09-25 22:53:01 pgsql: Fully const-ify PQconnectdbParams, PQconnectStartParams, and PQp