Commit 0960ae1
committed
Fix EXPLAIN Bitmap heap scan to count pages with no visible tuples
Previously, bitmap heap scans only counted lossy and exact pages for
explain when there was at least one visible tuple on the page.
heapam_scan_bitmap_next_block() returned true only if there was a
"valid" page with tuples to be processed. However, the lossy and exact
page counters in EXPLAIN should count the number of pages represented
in a lossy or non-lossy way in the constructed bitmap, regardless of
whether or not the pages ultimately contained visible tuples.
Backpatch to all supported versions.
Author: Melanie Plageman
Discussion: https://www.postgresql.org/message-id/CAAKRu_ZwCwWFeL_H3ia26bP2e7HiKLWt0ZmGXPVwPO6uXq0vaA@mail.gmail.com
Discussion: https://www.postgresql.org/message-id/CAAKRu_bxrXeZ2rCnY8LyeC2Ls88KpjWrQ%2BopUrXDRXdcfwFZGA@mail.gmail.com1 parent 48018f1 commit 0960ae1
File tree
2 files changed
+8
-6
lines changed- src
- backend/executor
- test/regress/expected
2 files changed
+8
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
207 | 212 | | |
208 | 213 | | |
209 | 214 | | |
| |||
235 | 240 | | |
236 | 241 | | |
237 | 242 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2848 | 2848 | | |
2849 | 2849 | | |
2850 | 2850 | | |
| 2851 | + | |
2851 | 2852 | | |
2852 | 2853 | | |
2853 | 2854 | | |
| |||
2863 | 2864 | | |
2864 | 2865 | | |
2865 | 2866 | | |
| 2867 | + | |
2866 | 2868 | | |
2867 | 2869 | | |
2868 | | - | |
| 2870 | + | |
2869 | 2871 | | |
2870 | 2872 | | |
2871 | 2873 | | |
| |||
0 commit comments