pageinspect: Fix relcache leak in gist_page_items().
Heikki Linnakangas <heikki.linnakangas@iki.fi>
pageinspect: Fix relcache leak in gist_page_items(). The gist_page_items() function opened the index relation on first call and closed it on the last call. But there's no guarantee that the function is run to completion, leading to a relcache leak and warning at the end of the transaction. To fix, refactor the function to return all the rows in one call, as a tuplestore. Reported-by: Tom Lane Discussion: https://www.postgresql.org/message-id/234863.1610916631%40sss.pgh.pa.us
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pageinspect/gistfuncs.c | modified | +74 −96 |
Discussion
- Yet another fast GiST build 138 messages · 2019-08-26 → 2021-12-16