pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16667: COMMIT AND CHAIN does not udpates database metrics ie. xact_commit
3+ messages / 3 participants
[nested] [flat]

* BUG #16667: COMMIT AND CHAIN does not udpates database metrics ie. xact_commit
@ 2020-10-12 13:55 PG Bug reporting form <noreply@postgresql.org>
  2020-10-12 15:21 ` Re: BUG #16667: COMMIT AND CHAIN does not udpates database metrics ie. xact_commit Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Bug reporting form @ 2020-10-12 13:55 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: axgrech@gmail.com

The following bug has been logged on the website:

Bug reference:      16667
Logged by:          COMMIT AND CHAIN - pg_stat_database metrics are not updated
Email address:      axgrech@gmail.com
PostgreSQL version: 12.4
Operating system:   RHEL 7.8
Description:        

We have an application that uses a new feature COMMIT AND CHAIN, the
application works generaly OK, but we have noticed that the pg_stat_database
(xact_commit/xact_rollback) are not updated, as they are if we used
BEGIN/COMMIT/BEGIN.
according to the documentation COMMIT AND CHAIN commits current transaction
and starts a new transaction with the same characteristic as current, what
we believe should impact number of transactions reported by the database.

There is some change when we stop our application (the app is server type,
that keeps database connection open all the time), however pg_stat_number
numbers does not matches (ok, i have not checked it with details, but it
looks it does not).

As the pg_stat_database metrics (i am not sure about other metrics) are not
updated, the monitoring tools does not report any activity on the database.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #16667: COMMIT AND CHAIN does not udpates database metrics ie. xact_commit
  2020-10-12 13:55 BUG #16667: COMMIT AND CHAIN does not udpates database metrics ie. xact_commit PG Bug reporting form <noreply@postgresql.org>
@ 2020-10-12 15:21 ` Tom Lane <tgl@sss.pgh.pa.us>
  2020-10-12 21:23   ` Re: BUG #16667: COMMIT AND CHAIN does not udpates database metrics ie. xact_commit adam grech <axgrech@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2020-10-12 15:21 UTC (permalink / raw)
  To: axgrech@gmail.com; +Cc: pgsql-bugs@lists.postgresql.org

PG Bug reporting form <noreply@postgresql.org> writes:
> We have an application that uses a new feature COMMIT AND CHAIN, the
> application works generaly OK, but we have noticed that the pg_stat_database
> (xact_commit/xact_rollback) are not updated, as they are if we used
> BEGIN/COMMIT/BEGIN.

I can't reproduce that here.  Indeed, in a quick check I'd say the
opposite: it looks like xact_commit advances twice where I'd only
have expected it to advance once.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #16667: COMMIT AND CHAIN does not udpates database metrics ie. xact_commit
  2020-10-12 13:55 BUG #16667: COMMIT AND CHAIN does not udpates database metrics ie. xact_commit PG Bug reporting form <noreply@postgresql.org>
  2020-10-12 15:21 ` Re: BUG #16667: COMMIT AND CHAIN does not udpates database metrics ie. xact_commit Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-10-12 21:23   ` adam grech <axgrech@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: adam grech @ 2020-10-12 21:23 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs@lists.postgresql.org

The test case code uses ANSI C and libpq.
I will check does ECPG behaves the same way.

Adam

W dniu pon., 12.10.2020 o 17:21 Tom Lane <tgl@sss.pgh.pa.us> napisaƂ(a):

> PG Bug reporting form <noreply@postgresql.org> writes:
> > We have an application that uses a new feature COMMIT AND CHAIN, the
> > application works generaly OK, but we have noticed that the
> pg_stat_database
> > (xact_commit/xact_rollback) are not updated, as they are if we used
> > BEGIN/COMMIT/BEGIN.
>
> I can't reproduce that here.  Indeed, in a quick check I'd say the
> opposite: it looks like xact_commit advances twice where I'd only
> have expected it to advance once.
>
>                         regards, tom lane
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2020-10-12 21:23 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12 13:55 BUG #16667: COMMIT AND CHAIN does not udpates database metrics ie. xact_commit PG Bug reporting form <noreply@postgresql.org>
2020-10-12 15:21 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-10-12 21:23   ` adam grech <axgrech@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox