pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove dead NoMovementScanDirection code
Date: Tue, 31 Jan 2023 21:53:20 +0000
Message-ID: <E1pMyZ5-000xBg-KJ@gemulon.postgresql.org> (raw)

Remove dead NoMovementScanDirection code

Here remove some dead code from heapgettup() and heapgettup_pagemode()
which was trying to support NoMovementScanDirection scans.  This code can
never be reached as standard_ExecutorRun() never calls ExecutePlan with
NoMovementScanDirection.

Additionally, plans which were scanning an unordered index would use
NoMovementScanDirection rather than ForwardScanDirection.  There was no
real need for this, so here we adjust this so we use ForwardScanDirection
for unordered index scans.  A comment in pathnodes.h claimed that
NoMovementScanDirection was used for PathKey reasons, but if that was
true, it no longer is, per code in build_index_paths().

This does change the non-text format of the EXPLAIN output so that
unordered index scans now have a "Forward" scan direction rather than
"NoMovement".  The text format of EXPLAIN has not changed.

Author: Melanie Plageman
Reviewed-by: Tom Lane, David Rowley
Discussion: https://postgr.es/m/CAAKRu_bvkhka0CZQun28KTqhuUh5ZqY=_T8QEqZqOL02rpi2bw@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/access/heap/heapam.c         | 67 +-------------------------------
src/backend/commands/explain.c           |  3 --
src/backend/executor/nodeIndexonlyscan.c | 16 ++++----
src/backend/executor/nodeIndexscan.c     | 16 ++++----
src/backend/optimizer/path/indxpath.c    |  8 +---
src/backend/optimizer/plan/createplan.c  |  3 ++
src/backend/optimizer/util/pathnode.c    |  4 +-
src/include/access/sdir.h                | 13 ++++++-
src/include/access/tableam.h             |  8 ++++
src/include/nodes/pathnodes.h            |  7 +---
10 files changed, 43 insertions(+), 102 deletions(-)



Message-ID: <E1pMyZ5-000xBg-KJ@gemulon.postgresql.org>
Permalink:  ../E1pMyZ5-000xBg-KJ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pMyZ5-000xBg-KJ@gemulon.postgresql.org

 · 

reply

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: drowley@postgresql.org
  Subject: Re: pgsql: Remove dead NoMovementScanDirection code
  In-Reply-To: <E1pMyZ5-000xBg-KJ@gemulon.postgresql.org>
  References: <E1pMyZ5-000xBg-KJ@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