Commit 309765f
committed
Fix handling of empty uncompressed posting list pages in GIN
PostgreSQL 9.4 introduces posting list compression in GIN. This feature
supports online upgrade, so that after pg_upgrade uncompressed posting
lists are compressed on-the-fly. Underlying code appears to always
expect at least one item on uncompressed posting list page. But there
could be completely empty pages, because VACUUM never deletes leftmost
and rightmost pages from posting trees. This commit fixes that.
Reported-by: Sivasubramanian Ramasubramanian
Discussion: https://postgr.es/m/1531867212836.63354%40amazon.com
Author: Sivasubramanian Ramasubramanian, Alexander Korotkov
Backpatch-through: 9.41 parent b90d97e commit 309765f
2 files changed
+33
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1394 | 1394 | | |
1395 | 1395 | | |
1396 | 1396 | | |
1397 | | - | |
| 1397 | + | |
| 1398 | + | |
1398 | 1399 | | |
1399 | 1400 | | |
1400 | 1401 | | |
1401 | 1402 | | |
1402 | 1403 | | |
1403 | 1404 | | |
1404 | 1405 | | |
1405 | | - | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
1406 | 1409 | | |
1407 | | - | |
1408 | | - | |
1409 | | - | |
1410 | | - | |
1411 | | - | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
1412 | 1415 | | |
1413 | | - | |
| 1416 | + | |
| 1417 | + | |
1414 | 1418 | | |
1415 | 1419 | | |
1416 | 1420 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | 156 | | |
158 | | - | |
159 | | - | |
160 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
161 | 172 | | |
162 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
163 | 179 | | |
164 | | - | |
165 | 180 | | |
166 | 181 | | |
167 | 182 | | |
| |||
0 commit comments