aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/arrayutils.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-11-13 11:44:35 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2023-11-13 11:44:35 -0500
commit5c62ecf6ec3c912c85a8292a9ad0daa8c0777088 (patch)
tree499e9a8d2673d1e4b01637e1855276595a784388 /src/backend/utils/adt/arrayutils.c
parentc3fd6a10fc520158e381d0296316be387b5b8da7 (diff)
downloadpostgresql-5c62ecf6ec3c912c85a8292a9ad0daa8c0777088.tar.gz
postgresql-5c62ecf6ec3c912c85a8292a9ad0daa8c0777088.zip
Don't release index root page pin in ginFindParents().
It's clearly stated in the comments that ginFindParents() must keep the pin on the index's root page that's associated with the topmost GinBtreeStack item. However, the code path for the case that the desired downlink has been pushed down to the next index level ignored this proviso, and would release the pin anyway if we were still examining the root level. That led to an assertion failure or "buffer NNNN is not owned by resource owner" error later, when we try to release the pin again at the end of the insertion. This is quite hard to reproduce, since it can only happen if an index root page split occurs concurrently with our own insertion. Thanks to Jeff Janes for finding a test case that triggers it often enough to allow investigation. This has been there since the beginning of GIN, so back-patch to all supported branches. Discussion: https://postgr.es/m/CAMkU=1yCAKtv86dMrD__Ja-7KzjE=uMeKX8y__cx5W-OEWy2ow@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/arrayutils.c')
0 files changed, 0 insertions, 0 deletions