Re: Virtual tx id

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: James Sewell <james(dot)sewell(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Virtual tx id
Date: 2022-09-21 04:21:10
Message-ID: 20220921042110.2akmfffhy6f3fdpe@jrouhaud
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Wed, Sep 21, 2022 at 01:58:47PM +1000, James Sewell wrote:
> Hello Hackers!
>
> Is it possible to get the current virtual txid from C somehow?
>
> I've looked through the code, but can't seem to find anything other than
> getting a NULL when there is no (real) xid assigned. Maybe I'm missing
> something?

It should be MyProc->lxid, and prepend it with MyBackendId if you want to
compare something like pg_locks.virtualtransaction.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2022-09-21 04:31:26 Re: predefined role(s) for VACUUM and ANALYZE
Previous Message Zhang Mingli 2022-09-21 04:19:46 Re: Virtual tx id