pgsql: Prohibit shutting down resources if there is a possibility of ba

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Prohibit shutting down resources if there is a possibility of ba
Date: 2018-08-13 03:30:08
Message-ID: E1fp3YW-0007jz-2g@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Prohibit shutting down resources if there is a possibility of back up.

Currently, we release the asynchronous resources as soon as it is evident
that no more rows will be needed e.g. when a Limit is filled. This can be
problematic especially for custom and foreign scans where we can scan
backward. Fix that by disallowing the shutting down of resources in such
cases.

Reported-by: Robert Haas
Analysed-by: Robert Haas and Amit Kapila
Author: Amit Kapila
Reviewed-by: Robert Haas
Backpatch-through: 9.6 where this code was introduced
Discussion: https://postgr.es/m/86137f17-1dfb-42f9-7421-82fd786b04a1@anayrat.info

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ba10eaef509bf47de743589a232e83f071acf8dc

Modified Files
--------------
src/backend/executor/execMain.c | 16 ++++++++++++----
src/backend/executor/nodeLimit.c | 10 ++++++++--
2 files changed, 20 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2018-08-13 05:00:12 pgsql: Adjust comment atop ExecShutdownNode.
Previous Message Andrew Gierth 2018-08-13 01:07:54 pgsql: Avoid query-lifetime memory leaks in XMLTABLE (bug #15321)