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.