pgsql: Fix some near-bugs related to ResourceOwner function arguments - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Fix some near-bugs related to ResourceOwner function arguments
Date
Msg-id E1vTGqS-003n5U-1F@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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 <boekewurm+postgres@gmail.com>
Discussion: https://www.postgresql.org/message-id/CAEze2Whnfv8VuRZaohE-Af+GxBA1SNfD_rXfm84Jv-958UCcJA@mail.gmail.com
Backpatch-through: 17

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e8dc5810a227d5671c25dc2c7dbe1321093a08a6

Modified Files
--------------
src/backend/storage/aio/aio.c      | 12 ++++++------
src/backend/utils/cache/catcache.c |  4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: pgsql: injection_points: Remove portions related to custom pgstats
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix comment in GetPublicationRelations