Re: [EXT] DBeaver session populating pg_stat_activity.backend_xmin - Mailing list pgsql-general

From Christophe Pettus
Subject Re: [EXT] DBeaver session populating pg_stat_activity.backend_xmin
Date
Msg-id E11FB0E3-54F5-45A2-9C5C-1AEAAFADB62F@thebuild.com
Whole thread Raw
In response to RE: [EXT] Re: DBeaver session populating pg_stat_activity.backend_xmin  ("Dirschel, Steve" <steve.dirschel@thomsonreuters.com>)
Responses RE: [EXT] DBeaver session populating pg_stat_activity.backend_xmin  ("Dirschel, Steve" <steve.dirschel@thomsonreuters.com>)
List pgsql-general

> On Jan 25, 2023, at 14:21, Dirschel, Steve <steve.dirschel@thomsonreuters.com> wrote:
> From my perspective "idle in transaction" isn't necessarily a problem (although I don't like seeing sessions sitting
likethat for a long time).  The problem is when pg_stat_activity.backend_xmin is populated-  that can prevent
autovacuumfrom cleaning up old records. 

I don't think that analysis is quite correct.  There's nothing about backend_xmin that blocks tuple cleanup *if the
transactionhas been committed*.  The problem is that the session is sitting in idle in transaction state, and *that*
blockstuple cleanup.  The fix is to not leave sessions open in idle in transaction state. 


pgsql-general by date:

Previous
From: Ron
Date:
Subject: Re: [EXT] Re: DBeaver session populating pg_stat_activity.backend_xmin
Next
From: veem v
Date:
Subject: Sequence vs UUID