From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Satalabaha Postgres <satalabaha.postgres@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: backend_xid and backend_xmin
Date: Thu, 08 Dec 2022 21:46:12 +0100
Message-ID: <9565562b389eb3c105588d3c218907f84d0a2fa9.camel@cybertec.at> (raw)
In-Reply-To: <CAJ_W8nbTE+GHOnErP=DURZGbJ1oEupuB4xOgrNZvN6LD4Gqrpg@mail.gmail.com>
References: <CAJ_W8nbTE+GHOnErP=DURZGbJ1oEupuB4xOgrNZvN6LD4Gqrpg@mail.gmail.com>
On Thu, 2022-12-08 at 21:01 +0530, Satalabaha Postgres wrote:
> I would like to understand the possible causes for backend_xmin getting
> populated in pg_stat_activity. Can someone throw some light on this?
"backend_xid" is set when the session has an open transaction that has
modified data and therefore got a transaction ID.
"backend_xmin" is set if there is an active snapshot held by the session:
- there is a running query
- there is an open transaction with an open cursor
- there is an open transaction with isolation level REPEATABLE READ or higher
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: laurenz.albe@cybertec.at, satalabaha.postgres@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: backend_xid and backend_xmin
In-Reply-To: <9565562b389eb3c105588d3c218907f84d0a2fa9.camel@cybertec.at>
* 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