Fix some near-bugs related to ResourceOwner function arguments
authorHeikki Linnakangas <[email protected]>
Wed, 10 Dec 2025 09:43:16 +0000 (11:43 +0200)
committerHeikki Linnakangas <[email protected]>
Wed, 10 Dec 2025 09:43:16 +0000 (11:43 +0200)
commitfa44b8b7fbb7eb0f13546aa13976f9919a4ca201
tree2604cef1ab76b56e8abb421b6eb8c0592fdd8e56
parent8268e66ac64cb846517580e0808f971343391fdf
Fix some near-bugs related to ResourceOwner function arguments

These functions took a ResourceOwner argument, but only checked if it
was NULL, and then used CurrentResourceOwner for the actual work.
Surely the intention was to use the passed-in resource owner. All
current callers passed CurrentResourceOwner or NULL, so this has no
consequences at the moment, but it's an accident waiting to happen for
future caller and extensions.

Author: Matthias van de Meent <[email protected]>
Discussion: https://www.postgresql.org/message-id/CAEze2Whnfv8VuRZaohE-Af+GxBA1SNfD_rXfm84Jv-958UCcJA@mail.gmail.com
Backpatch-through: 17
src/backend/storage/aio/aio.c
src/backend/utils/cache/catcache.c