From: Jerry Sievers <gsievers19@comcast.net>
To: Hu\, Patricia <Patricia.Hu@finra.org>
Cc: pgsql general \(pgsql-general\@postgresql.org\) <pgsql-general@postgresql.org>
Subject: Re: what causes xact_rollback for a database in pg_stat_database to increment?
Date: Wed, 04 Dec 2019 16:31:35 -0600
Message-ID: <87r21joh88.fsf@jsievers.enova.com> (raw)
In-Reply-To: <DM6PR10MB3500FA1E35234FE668127DF9FA5D0@DM6PR10MB3500.namprd10.prod.outlook.com>
References: <DM6PR10MB3500FA1E35234FE668127DF9FA5D0@DM6PR10MB3500.namprd10.prod.outlook.com>
"Hu, Patricia" <Patricia.Hu@finra.org> writes:
> We’ve been seeing over 200k rollbacks being recorded for a database
> at certain hour overnight but can’t see the corresponding ROLLBACK
> statements being recorded in postgresql db logs, even though our
> log_statement is set to ALL.
>
>
>
> I did some tests and confirmed that xact_rollback count increments in
> scenarios below and am looking further at those.
>
> 1. a ROLLBACK is issued explicitly or implicitly(if a
> transaction or pl/pgsql block/function raises an exception or was
> aborted)
>
> 2. it doesn’t reflect the number of records being rolled back
>
> 3. even if ROLLBACK statement results in WARNING like “there is
> no transaction in progress”, it increments
>
>
>
> Does anyone know on top of his/her head any (other) explanation for
> such unaccounted for rollbacks?
Dangling session...
begin;
select this;
select that...
<drop connection>
HTH
>
>
>
> Thanks,
>
> Patricia
>
>
>
> Confidentiality Notice:: This email, including attachments, may
> include non-public, proprietary, confidential or legally privileged
> information. If you are not an intended recipient or an authorized
> agent of an intended recipient, you are hereby notified that any
> dissemination, distribution or copying of the information contained
> in or transmitted with this e-mail is unauthorized and strictly
> prohibited. If you have received this email in error, please notify
> the sender by replying to this message and permanently delete this
> e-mail, its attachments, and any copies of it immediately. You should
> not retain, copy or use this e-mail or any attachment for any
> purpose, nor disclose all or any part of the contents to any other
> person. Thank you.
>
>
--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: gsievers19@comcast.net, Patricia.Hu@finra.org
Subject: Re: what causes xact_rollback for a database in pg_stat_database to increment?
In-Reply-To: <87r21joh88.fsf@jsievers.enova.com>
References: <DM6PR10MB3500FA1E35234FE668127DF9FA5D0@DM6PR10MB3500.namprd10.prod.outlook.com> <87r21joh88.fsf@jsievers.enova.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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