Re: [PATCH] Hooks at XactCommand level

2021-09-04 Thread Gilles Darold
I have changed the status of this proposal as rejected. To resume the final state of this proposal there is no consensus on the interest to add a hook on start xact commands. Also the only useful case for this hook was to be able to have a server side automatic rollback at statement level.

Re: [PATCH] Hooks at XactCommand level

2021-08-13 Thread Gilles Darold
Le 13/08/2021 à 11:58, Andres Freund a écrit : > Hi, > > On 2021-08-10 10:12:26 +0200, Gilles Darold wrote: >> Sorry for the response delay. I have though about adding this odd hook to be >> able to implement this feature through an extension because I don't think >> this is something that should

Re: [PATCH] Hooks at XactCommand level

2021-08-13 Thread Andres Freund
Hi, On 2021-08-10 10:12:26 +0200, Gilles Darold wrote: > Sorry for the response delay. I have though about adding this odd hook to be > able to implement this feature through an extension because I don't think > this is something that should be implemented in core. There were also > patches

Re: [PATCH] Hooks at XactCommand level

2021-08-10 Thread Gilles Darold
Le 30/07/2021 à 23:49, Tom Lane a écrit : Andres Freund writes: On 2021-07-30 13:58:51 -0400, Tom Lane wrote: I've not read this version of the patch, but I see from the cfbot's results that it's broken postgres_fdw. I think this may partially be an issue with the way that postgres_fdw uses

Re: [PATCH] Hooks at XactCommand level

2021-08-10 Thread Gilles Darold
Le 31/07/2021 à 01:28, Andres Freund a écrit : I'm *very* unconvinced it makes sense to implement a feature like this in an extension / that we should expose API for that purpose. To me the top-level transaction state is way too tied to our internals for it to be reasonably dealt with in an

Re: [PATCH] Hooks at XactCommand level

2021-07-30 Thread Andres Freund
Hi, On 2021-07-30 17:49:09 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2021-07-30 13:58:51 -0400, Tom Lane wrote: > >> I've not read this version of the patch, but I see from the cfbot's > >> results that it's broken postgres_fdw. > > > I think this may partially be an issue with the

Re: [PATCH] Hooks at XactCommand level

2021-07-30 Thread Tom Lane
Andres Freund writes: > On 2021-07-30 13:58:51 -0400, Tom Lane wrote: >> I've not read this version of the patch, but I see from the cfbot's >> results that it's broken postgres_fdw. > I think this may partially be an issue with the way that postgres_fdw > uses the callback than with the patch.

Re: [PATCH] Hooks at XactCommand level

2021-07-30 Thread Andres Freund
Hi, On 2021-07-30 13:58:51 -0400, Tom Lane wrote: > Gilles Darold writes: > > [ 1-startcommand_xact_callback-v2.diff ] > > I've not read this version of the patch, but I see from the cfbot's > results that it's broken postgres_fdw. I recall that postgres_fdw > uses the XactCallback and

Re: [PATCH] Hooks at XactCommand level

2021-07-30 Thread Tom Lane
Gilles Darold writes: > [ 1-startcommand_xact_callback-v2.diff ] I've not read this version of the patch, but I see from the cfbot's results that it's broken postgres_fdw. I recall that postgres_fdw uses the XactCallback and SubXactCallback mechanisms, so I'm betting this means that you've

Re: [PATCH] Hooks at XactCommand level

2021-07-16 Thread Gilles Darold
Le 14/07/2021 à 21:26, Tom Lane a écrit : Gilles Darold 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

Re: [PATCH] Hooks at XactCommand level

2021-07-15 Thread Gilles Darold
Le 15/07/2021 à 09:44, Gilles Darold a écrit : Le 14/07/2021 à 21:26, Tom Lane a écrit : Gilles Darold 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

Re: [PATCH] Hooks at XactCommand level

2021-07-15 Thread Gilles Darold
Le 14/07/2021 à 21:26, Tom Lane a écrit : Gilles Darold 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

Re: [PATCH] Hooks at XactCommand level

2021-07-14 Thread Tom Lane
Gilles Darold 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

Re: [PATCH] Hooks at XactCommand level

2021-07-14 Thread Gilles Darold
Hi, 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. Here is the new description corresponding to the current patch. This patch allow to

Re: [PATCH] Hooks at XactCommand level

2021-07-05 Thread Gilles Darold
Le 01/07/2021 à 18:47, Tom Lane a écrit : Nicolas CHAHWEKILIAN writes: As far as I am concerned, I am totally awaiting for this kind of feature exposed here, for one single reason at this time : the extension pg_statement_rollback will be much more valuable with the ability of processing

Re: [PATCH] Hooks at XactCommand level

2021-07-03 Thread Gilles Darold
Le 01/07/2021 à 18:47, Tom Lane a écrit : > Nicolas CHAHWEKILIAN writes: >> As far as I am concerned, I am totally awaiting for this kind of feature >> exposed here, for one single reason at this time : the extension >> pg_statement_rollback will be much more valuable with the ability of >>

Re: [PATCH] Hooks at XactCommand level

2021-07-01 Thread Tom Lane
Nicolas CHAHWEKILIAN writes: > As far as I am concerned, I am totally awaiting for this kind of feature > exposed here, for one single reason at this time : the extension > pg_statement_rollback will be much more valuable with the ability of > processing "rollback to savepoint" without the need

Re: [PATCH] Hooks at XactCommand level

2021-06-23 Thread Nicolas CHAHWEKILIAN
Hello, As far as I am concerned, I am totally awaiting for this kind of feature exposed here, for one single reason at this time : the extension pg_statement_rollback will be much more valuable with the ability of processing "rollback to savepoint" without the need for explicit instruction

Re: [PATCH] Hooks at XactCommand level

2021-03-28 Thread Julien Rouhaud
On Sat, Mar 20, 2021 at 06:33:24PM +0800, Julien Rouhaud wrote: > > So, I have nothing more to say about the patch itself. At that point, I guess > that we can't keep postponing that topic, and we should either: > > - commit this patch, or Álvaro's one based on a new grammar keyword for BEGIN >

Re: [PATCH] Hooks at XactCommand level

2021-03-20 Thread Julien Rouhaud
On Fri, Mar 19, 2021 at 11:02:29PM +0100, Gilles Darold wrote: > Le 12/03/2021 à 06:55, Julien Rouhaud a écrit : > > > > I don't think we need to pass any information at least for the rollback > at statement level extension. All information needed are accessible and > actually at

Re: [PATCH] Hooks at XactCommand level

2021-03-19 Thread Gilles Darold
Le 12/03/2021 à 06:55, Julien Rouhaud a écrit : > Hi, > > On Tue, Dec 08, 2020 at 11:15:12AM +0100, Gilles Darold wrote: >> Based on a PoC reported in a previous thread [1] I'd like to propose new >> hooks around transaction commands. The objective of this patch is to >> allow PostgreSQL extension

Re: [PATCH] Hooks at XactCommand level

2021-03-11 Thread Julien Rouhaud
Hi, On Tue, Dec 08, 2020 at 11:15:12AM +0100, Gilles Darold wrote: > > Based on a PoC reported in a previous thread [1] I'd like to propose new > hooks around transaction commands. The objective of this patch is to > allow PostgreSQL extension to act at start and end (including abort) of > a SQL

Re: [PATCH] Hooks at XactCommand level

2021-03-11 Thread Julien Rouhaud
Hi David, On Thu, Mar 11, 2021 at 07:41:35AM -0500, David Steele wrote: > Hi Julien, > > On 12/8/20 5:15 AM, Gilles Darold wrote: > > > > Based on a PoC reported in a previous thread [1] I'd like to propose new > > hooks around transaction commands. The objective of this patch is to > > allow

Re: [PATCH] Hooks at XactCommand level

2021-03-11 Thread David Steele
Hi Julien, On 12/8/20 5:15 AM, Gilles Darold wrote: Based on a PoC reported in a previous thread [1] I'd like to propose new hooks around transaction commands. The objective of this patch is to allow PostgreSQL extension to act at start and end (including abort) of a SQL statement in a

[PATCH] Hooks at XactCommand level

2020-12-08 Thread Gilles Darold
Hi, Based on a PoC reported in a previous thread [1] I'd like to propose new hooks around transaction commands. The objective of this patch is to allow PostgreSQL extension to act at start and end (including abort) of a SQL statement in a transaction. The idea for these hooks is born from the no