[BUGFIX] amcanbackward is not checked before building backward indexpaths - Mailing list pgsql-hackers

From Nikita Glukhov
Subject [BUGFIX] amcanbackward is not checked before building backward indexpaths
Date
Msg-id 20c684f7-8160-f669-5adc-3f60ef12230f@postgrespro.ru
Whole thread Raw
Responses Re: [BUGFIX] amcanbackward is not checked before building backward index paths  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi hackers!

Experimenting with the new pluggable storage API, I found that amcanbackward
flag is not checked in build_index_paths() before
build_index_pathkeys(... BackwardScanDirection) call when we are building
paths for ORDER BY.  And this flag is even not copied into IndexOptInfo struct.
Obviously, this can lead to misuse of Backward Index [Only] Scan plans.

Attached patch with the corresponding fix.

There are no test cases because now only btree supports ordered scans but it
supports backward scans too.

-- 
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company


Attachment

pgsql-hackers by date:

Previous
From: Euler Taveira
Date:
Subject: Re: libpq compression
Next
From: Mark Dilger
Date:
Subject: Windows build broken starting at da9b580d89903fee871cf54845ffa2b26bda2e11