diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-03-27 18:30:21 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-03-27 18:30:21 +0000 |
commit | 25bf7f8b9b3ce0f04b498988bb98d9d5cf9bad67 (patch) | |
tree | 9d96a158b6c03def3242d5d4af85d843cd5490e0 /src/backend/executor/execQual.c | |
parent | a95307b639ad94fb94c898eb6b4a3c95c407bf44 (diff) | |
download | postgresql-25bf7f8b9b3ce0f04b498988bb98d9d5cf9bad67.tar.gz postgresql-25bf7f8b9b3ce0f04b498988bb98d9d5cf9bad67.zip |
Fix possible failures when a tuplestore switches from in-memory to on-disk
mode while callers hold pointers to in-memory tuples. I reported this for
the case of nodeWindowAgg's primary scan tuple, but inspection of the code
shows that all of the calls in nodeWindowAgg and nodeCtescan are at risk.
For the moment, fix it with a rather brute-force approach of copying
whenever one of the at-risk callers requests a tuple. Later we might
think of some sort of reference-count approach to reduce tuple copying.
Diffstat (limited to 'src/backend/executor/execQual.c')
-rw-r--r-- | src/backend/executor/execQual.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/executor/execQual.c b/src/backend/executor/execQual.c index a1e2589162c..d66bf4da822 100644 --- a/src/backend/executor/execQual.c +++ b/src/backend/executor/execQual.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.242 2009/03/26 22:26:06 petere Exp $ + * $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.243 2009/03/27 18:30:21 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1385,7 +1385,7 @@ restart: if (fcache->funcResultStore) { Assert(isDone); /* it was provided before ... */ - if (tuplestore_gettupleslot(fcache->funcResultStore, true, + if (tuplestore_gettupleslot(fcache->funcResultStore, true, false, fcache->funcResultSlot)) { *isDone = ExprMultipleResult; |