]> granicus.if.org Git - postgresql/commit
Prohibit shutting down resources if there is a possibility of back up.
authorAmit Kapila <akapila@postgresql.org>
Mon, 13 Aug 2018 03:03:55 +0000 (08:33 +0530)
committerAmit Kapila <akapila@postgresql.org>
Mon, 13 Aug 2018 03:03:55 +0000 (08:33 +0530)
commitc054afd0a22c75acec8f85872ae1036bd8519132
tree9760baa91b42131876fcdaa3091144ef2d02dc22
parent78f70e07e2cf42b95c9f0adb57e37cf6c1274ec3
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
src/backend/executor/execMain.c
src/backend/executor/nodeLimit.c