Re: Statistics updates is delayed when using `commit and chain` - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: Statistics updates is delayed when using `commit and chain`
Date
Msg-id CAKFQuwaTDMYW0v2cv+CxLfnyJ_OAh=Pc0YKvD8f3xc3DtB_LHQ@mail.gmail.com
Whole thread Raw
In response to Re: Statistics updates is delayed when using `commit and chain`  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Statistics updates is delayed when using `commit and chain`  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-bugs
On Tue, Jul 13, 2021 at 8:52 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
But look at it from the client's side.
How would it detangle its response to the notify event from whatever
it's doing as part of the chained transaction?

The chain writing client wouldn't receive its own notification until after the chain completes and thus would be unable to respond to it, avoiding all of this and having the same behavior as today.  It's any client except the chain authoring one that would receive the notification upon each chain link committing instead of waiting until the end of the chain.  I'm fine with those other clients having to wait, just as the chain authoring client does, until the chain is over as a matter of consistency - but I don't see how given those other clients earlier access to the notification risks being considered here.  We are already doing that now, though I argue we are in fact documenting the "other clients receive the notification as soon as committed - regardless of chaining" situation (the additional restrictions on receiving are then what cause the chain authoring client to wait).

David J.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Statistics updates is delayed when using `commit and chain`
Next
From: "David G. Johnston"
Date:
Subject: Re: Statistics updates is delayed when using `commit and chain`