From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Resource Owner reassign Locks |
Date: | 2015-08-25 18:20:57 |
Message-ID: | 20150825182057.GB19326@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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 */
...
?
> > Say because they want to
> > perform some operation and then release the locks without finishing the
> > transaction. Adding a zero argument
> > LockReleaseCurrentOwner()/LockReassignCurrentOwner() wrapper seems like
> > a small enough effort to simply not bother looking for existing callers.
>
> I agree that a wrapper is possible, but it's not without cost; both as to
> the time required to modify the patch, and as to possibly complicating
> future back-patching because the code becomes gratuitously different in
> the back branches. I really don't see that a wrapper is appropriate here.
Works for me.
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2015-08-25 18:26:02 | Re: pg_controldata output alignment regression |
Previous Message | Andres Freund | 2015-08-25 18:19:33 | Custom Scans and private data |