Refactor bitmap heap scan estimation of heap pages fetched.
authorRobert Haas <rhaas@postgresql.org>
Fri, 27 Jan 2017 21:22:11 +0000 (16:22 -0500)
committerRobert Haas <rhaas@postgresql.org>
Fri, 27 Jan 2017 21:28:47 +0000 (16:28 -0500)
commitda08a659897347859fdfe258c67e9d2bf680d4dd
treee3082498129bd3f74962f0d25c0ff5ba5ef3a058
parent350cb921ae2ced8674e098d0645f2493e5757ad1
Refactor bitmap heap scan estimation of heap pages fetched.

Currently, we only need this logic in order to cost a Bitmap Heap
Scan.  But a pending patch for Parallel Bitmap Heap Scan also uses
it to help figure out how many workers to use for the scan, which
has to be determined prior to costing.  So, move the logic to
a separate function to make that easier.

Dilip Kumar.  The patch series of which this is a part has been
reviewed by Andres Freund, Amit Khendekar, Tushar Ahuja, Rafia
Sabih, Haribabu Kommi, and me; it is not clear from the email
discussion which of those people have looked specifically at this
part.

Discussion: http://postgr.es/m/CAFiTN-v3QYNJEZnnmKCeATuLbN-h9tMVfeEF0+BrouYDqjXgwg@mail.gmail.com
src/backend/optimizer/path/costsize.c
src/include/optimizer/cost.h