Re: Statistics updates is delayed when using `commit and chain`

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Japin Li <japinli(at)hotmail(dot)com>, John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, Lætitia Avrot <laetitia(dot)avrot(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Statistics updates is delayed when using `commit and chain`
Date: 2021-07-14 04:02:53
Message-ID: CAKFQuwaTDMYW0v2cv+CxLfnyJ_OAh=Pc0YKvD8f3xc3DtB_LHQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Jul 13, 2021 at 8:52 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2021-07-14 04:06:28 Re: Statistics updates is delayed when using `commit and chain`
Previous Message Tom Lane 2021-07-14 03:52:40 Re: Statistics updates is delayed when using `commit and chain`