NoMovementScanDirection in heapgettup() and heapgettup_pagemode()

Started by Mithun Cyover 8 years ago3 messages
#1Mithun Cy
mithun.cy@enterprisedb.com

Hi all,
I was trying to study NoMovementScanDirection part of heapgettup() and
heapgettup_pagemode(). If I am right there is no test in test suit to
hit this code. I did run make check-world could not hit it. Also,
coverage report in
https://coverage.postgresql.org/src/backend/access/heap/heapam.c.gcov.html
shows this part of the code is not hit. Can somebody please help me to
understand this part of the code and how to test same?

--
Thanks and Regards
Mithun C Y
EnterpriseDB: http://www.enterprisedb.com

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Mithun Cy (#1)
Re: NoMovementScanDirection in heapgettup() and heapgettup_pagemode()

Mithun Cy <mithun.cy@enterprisedb.com> writes:

I was trying to study NoMovementScanDirection part of heapgettup() and
heapgettup_pagemode(). If I am right there is no test in test suit to
hit this code. I did run make check-world could not hit it. Also,
coverage report in
https://coverage.postgresql.org/src/backend/access/heap/heapam.c.gcov.html
shows this part of the code is not hit. Can somebody please help me to
understand this part of the code and how to test same?

I think that's probably dead code given that ExecutorRun short-circuits
everything for NoMovementScanDirection. There is some use of
NoMovementScanDirection for indexscans, to denote an unordered index,
but likely that could be got rid of too. That would leave us with
NoMovementScanDirection having no other use except as a do-nothing
flag for ExecutorRun.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Mithun Cy
mithun.cy@enterprisedb.com
In reply to: Tom Lane (#2)
Re: NoMovementScanDirection in heapgettup() and heapgettup_pagemode()

On Mon, Aug 28, 2017 at 5:50 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

I think that's probably dead code given that ExecutorRun short-circuits
everything for NoMovementScanDirection. There is some use of
NoMovementScanDirection for indexscans, to denote an unordered index,
but likely that could be got rid of too. That would leave us with
NoMovementScanDirection having no other use except as a do-nothing
flag for ExecutorRun.

regards, tom lane

Thanks, Tom, yes it seems to be a dead code.

--
Thanks and Regards
Mithun C Y
EnterpriseDB: http://www.enterprisedb.com

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers