public inbox for [email protected]  
help / color / mirror / Atom feed
From: Henson Choi <[email protected]>
To: Michael Paquier <[email protected]>
Cc: Pavlo Golub <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] Add pg_current_vxact_id() function to expose virtual transaction IDs
Date: Fri, 9 Jan 2026 12:15:21 +0900
Message-ID: <CAAAe_zBUd3epVqcDAMVmLDt4-dhxVY5W09+gp5ND_P--b90eeA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>

2026년 1월 9일 (금) AM 9:25, Michael Paquier <[email protected]>님이 작성:

> On Mon, Dec 08, 2025 at 12:09:58PM +0000, Pavlo Golub wrote:
> > Virtual transaction IDs are fundamental to PostgreSQL's transaction
> > tracking,
> > appearing in pg_locks.virtualtransaction, log output via %v placeholder,
> and
> > internal transaction management. However, there's currently no direct SQL
> > function to retrieve the current VXID, forcing applications to query
> > pg_locks
> > or parse log files to obtain this information.
>
> This is replacing one SQL in a given session by another, as a session
> currently running a transaction can query itself pg_locks and match an
> entry with its own pg_backend_pid().  Hence I don't see the need for
> this function, except simplicity in retrieving a session's state with
> less characters typed at the end?
>

I see this as a tradeoff between minor convenience and negligible
addition cost.

The community should decide whether this tradeoff is worth it.


> Thoughts and opinions from others are welcome.  I'm always OK to be
> outvoted.
> --
> Michael
>

Best regards,
Henson Choi


view thread (3+ messages)  latest in thread

reply

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: [PATCH] Add pg_current_vxact_id() function to expose virtual transaction IDs
  In-Reply-To: <CAAAe_zBUd3epVqcDAMVmLDt4-dhxVY5W09+gp5ND_P--b90eeA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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