From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix handling of REWIND/MARK/BACKWARD in incremental sort
Date: Sat, 09 May 2020 17:42:03 +0000
Message-ID: <E1jXTUB-0001VM-Jp@gemulon.postgresql.org> (raw)
Fix handling of REWIND/MARK/BACKWARD in incremental sort
The executor flags were not handled entirely correctly, although the
bugs were mostly harmless and it was mostly comment inaccuracy. We don't
need to strip any of the flags for child nodes.
Incremental sort does not support backward scans of mark/restore, so
MARK/BACKWARDS flags should not be possible. So we simply ensure this
using an assert, and we don't bother removing them when initializing
the child node.
With REWIND it's a bit less clear - incremental sort does not support
REWIND, but there is no way to signal this - it's legal to just ignore
the flag. We however continue passing the flag to child nodes, because
they might be useful to leverage that.
Reported-by: Michael Paquier
Author: James Coleman
Reviewed-by: Tomas Vondra
Discussion: https://postgr.es/m/20200414065336.GI1492@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/c4427226483c78618ba45eff34917400a77718a5
Modified Files
--------------
src/backend/executor/nodeIncrementalSort.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tomas.vondra@postgresql.org
Subject: Re: pgsql: Fix handling of REWIND/MARK/BACKWARD in incremental sort
In-Reply-To: <E1jXTUB-0001VM-Jp@gemulon.postgresql.org>
References: <E1jXTUB-0001VM-Jp@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox