Re: Resource Owner reassign Locks - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Resource Owner reassign Locks
Date
Msg-id 15775.1440527605@sss.pgh.pa.us
Whole thread Raw
In response to Re: Resource Owner reassign Locks  (Andres Freund <andres@anarazel.de>)
Responses Re: Resource Owner reassign Locks  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2015-08-25 14:12:37 -0400, Tom Lane wrote:
>> How would they have done that without major code surgery?  We don't have
>> any hooks or function pointers involved in the users of resowner.h.
>> Certainly locks would not be getting passed to a nonstandard resowner.

> CurrentResourceOwner = myresowner;
> /* do some op */

Yeah, but so what?  GrantLockLocal does not contain any way that external
code could change the way that a new lock is recorded.

(IOW, yeah, certainly third-party code could create a new *instance* of
the ResourceOwner data structure, but they would not have any knowledge of
what's inside unless they had hacked the core code.)
        regards, tom lane



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pg_controldata output alignment regression
Next
From: Andres Freund
Date:
Subject: Re: Resource Owner reassign Locks