Re: [HACKERS] InvokeObjectPostAlterHook() vs. CommandCounterIncrement()

2015-03-09 Thread Alvaro Herrera
Robert Haas wrote: > On Sun, Jul 21, 2013 at 4:44 AM, Ants Aasma wrote: > > On Jul 21, 2013 4:06 AM, "Noah Misch" wrote: > >> If these hooks will need to apply to a larger operation, I > >> think that mandates a different means to reliably expose the before/after > >> object states. > > > > I hav

Re: [HACKERS] InvokeObjectPostAlterHook() vs. CommandCounterIncrement()

2013-07-22 Thread Robert Haas
On Sun, Jul 21, 2013 at 4:44 AM, Ants Aasma wrote: > On Jul 21, 2013 4:06 AM, "Noah Misch" wrote: >> If these hooks will need to apply to a larger operation, I >> think that mandates a different means to reliably expose the before/after >> object states. > > I haven't checked the code to see how

Re: [HACKERS] InvokeObjectPostAlterHook() vs. CommandCounterIncrement()

2013-07-21 Thread Noah Misch
On Sun, Jul 21, 2013 at 11:44:51AM +0300, Ants Aasma wrote: > On Jul 21, 2013 4:06 AM, "Noah Misch" wrote: > > If these hooks will need to apply to a larger operation, I > > think that mandates a different means to reliably expose the before/after > > object states. > > I haven't checked the code

Re: [HACKERS] InvokeObjectPostAlterHook() vs. CommandCounterIncrement()

2013-07-21 Thread Ants Aasma
On Jul 21, 2013 4:06 AM, "Noah Misch" wrote: > If these hooks will need to apply to a larger operation, I > think that mandates a different means to reliably expose the before/after > object states. I haven't checked the code to see how it would fit the API, but what about taking a snapshot befor

[HACKERS] InvokeObjectPostAlterHook() vs. CommandCounterIncrement()

2013-07-20 Thread Noah Misch
objectaccess.h has this to say: * OAT_POST_ALTER should be invoked just after the object is altered, * but before the command counter is incremented. An extension using the * hook can use SnapshotNow and SnapshotSelf to get the old and new * versions of the tuple. That's a clever design, but