forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit70c4f50
committed
Fix crash when a page was split during GiST index creation.
The bug was similar to the one that was fixed in commit2225168. Whenwe split page X and insert the downlink for the new page, the parent pagemight also need to be split. When that happens, the downlink offset numberwe remembered for X is no longer valid. We correctly calledgistFindCorrectParent() to re-find it, but gistFindCorrectParent() doesn'tdo anything if the LSN of the page hasn't changed, and we stopped updatingLSNs during index build in commit9155580. The buggy codepath was takenif the page was split into three or more pages, and inserting the downlinkcaused the parent page to split. To fix, explicitly mark the downlinkoffset number as invalid, to force gistFindCorrectParent() to re-find it.Fixes bug #16134 reported by Alexander Lakhin, reported again as #16162 byAndreas Kunert. Thanks to Jeff Janes, Tom Lane and Tomas Vondra fordebugging. Backpatch to v12, where we stopped WAL-logging during indexbuild.Discussion:https://www.postgresql.org/message-id/16134-0423f729671dec64%40postgresql.orgDiscussion:https://www.postgresql.org/message-id/16162-45d21b7b6c1a3105%40postgresql.org1 parent07c4b6a commit70c4f50
1 file changed
+1
-0
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1358 | 1358 |
| |
1359 | 1359 |
| |
1360 | 1360 |
| |
| 1361 | + | |
1361 | 1362 |
| |
1362 | 1363 |
| |
1363 | 1364 |
| |
|
0 commit comments
Comments
(0)