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

From: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
To: Japin Li <japinli(at)hotmail(dot)com>
Cc: Lætitia Avrot <laetitia(dot)avrot(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Statistics updates is delayed when using `commit and chain`
Date: 2021-07-09 12:25:33
Message-ID: CAFBsxsHPm+CvjKGM+Whmxx0UWTCk8-meU44YcB9ya2xbw1+0Kw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Jul 9, 2021 at 7:15 AM Japin Li <japinli(at)hotmail(dot)com> wrote:
> > /* Send out notify signals and transmit self-notifies */
> > ProcessCompletedNotifies();
> >
> > /*
> > * Also process incoming notifies, if any. This is
mostly to
> > * ensure stable behavior in tests: if any notifies were
> > * received during the just-finished transaction,
they'll be
> > * seen by the client before ReadyForQuery is.
> > */
> > if (notifyInterruptPending)
> > ProcessNotifyInterrupt();

It seems the above would also be skipped in chained transactions -- do we
need to handle notifies as well?

> Attached fixes it by call pgstat_report_stat() when we a in COMMIT AND
CHAIN mode.
> Any thoughts?

Do we need equivalent logic within the TBLOCK_SUBCOMMIT case also? Either
way, a comment is probably in order.

--
John Naylor
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message John Naylor 2021-07-09 12:52:57 Re: problem in app installation
Previous Message Japin Li 2021-07-09 11:15:08 Re: Statistics updates is delayed when using `commit and chain`