Re: [PATCH] Hooks at XactCommand level - Mailing list pgsql-hackers

From Gilles Darold
Subject Re: [PATCH] Hooks at XactCommand level
Date
Msg-id 885a4cb8-6f84-4dad-2e15-33c3dc8ad443@darold.net
Whole thread Raw
In response to Re: [PATCH] Hooks at XactCommand level  (Gilles Darold <gilles@darold.net>)
List pgsql-hackers
Le 15/07/2021 à 09:44, Gilles Darold a écrit :
> Le 14/07/2021 à 21:26, Tom Lane a écrit :
>> Gilles Darold<gilles@darold.net>  writes:
>>> I have renamed the patch and the title of this proposal registered in
>>> the commitfest "Xact/SubXact event callback at command start" to reflect
>>> the last changes that do not include new hooks anymore.
>> Hmm, it doesn't seem like this has addressed my concern at all.
>> The callbacks are still effectively defined as "run during
>> start_xact_command", so they're not any less squishy semantically
>> than they were before.  The point of my criticism was that you
>> should move the call site to someplace that's more organically
>> connected to execution of commands.
>
> I would like to move it closer to the command execution but the only
> place I see would be in BeginCommand() which actually is waiting for
> code to execute, for the moment this function does nothing. I don't
> see another possible place after start_xact_command() call. All my
> attempt to inject the callback after start_xact_command() result in a
> failure. If you see an other place I will be please to give it a test.
>

Looks like I have not well understood again, maybe you want me to move
the callback just after the start_xact_command() so that it is not
"hidden" in the "run during
start_xact_command". Ok, I will do that.


--
Gilles Darold
http://www.darold.net/





pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Git revision in tarballs
Next
From: "r.takahashi_2@fujitsu.com"
Date:
Subject: Speed up COMMIT PREPARED