From: Virendra Kumar <viru_7683@yahoo.com>
To: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: xact_start time set to very old value
Date: Mon, 10 Aug 2020 06:05:12 +0000 (UTC)
Message-ID: <1930665427.2385958.1597039512032@mail.yahoo.com> (raw)
References: <1930665427.2385958.1597039512032.ref@mail.yahoo.com>
Hi Team,
We have observed that xact_start time is null for some period and suddenly it populates to very old value. We have a query which runs every minute to report any transactions running for long time. That query reports nothing continuously for a minute before and suddenly it reports one transaction which is running for more than one day. Is there something wrong here in populating xact_start time in pg_stat_activity? Shall we go with any other approach to detect long running transaction in database? Can someone guide on this?
I went through a thread - https://www.postgresql.org/message-id/20140424101827.2714.39486%40wrigleys.postgresql.org but not sure where it concluded.
Appreciate your response.
We are using AWS RDS 11.4.
Regards,-Virendra
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: viru_7683@yahoo.com
Subject: Re: xact_start time set to very old value
In-Reply-To: <1930665427.2385958.1597039512032@mail.yahoo.com>
References: <1930665427.2385958.1597039512032.ref@mail.yahoo.com> <1930665427.2385958.1597039512032@mail.yahoo.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