Re: Current transaction ID? - Mailing list pgsql-general

From Bruce Momjian
Subject Re: Current transaction ID?
Date
Msg-id 200506142348.j5ENmoH19070@candle.pha.pa.us
Whole thread Raw
In response to Re: Current transaction ID?  ("Steve - DND" <postgres@digitalnothing.com>)
Responses Re: Current transaction ID?
List pgsql-general
Steve - DND wrote:
> > Steve - DND wrote:
> > > Simple question I'm sure, but how can I get the transaction ID
> > that a query
> > > is currently running in? I can find all kinds of documentation
> > talking about
> > > transaction ids, but nothing about how to get the current one.
> >
> > You can look at the xmin of a tuple you created or an xmax of a tuple
> > you deleted.
>
> Let's pretend I don't know how to do that. :) Do you have a link to a page
> in the manual that describes this process, or can you give me a quick
> runthrough of what you're talking about?

Every row has an invisible xmin/xmax columns that represent the xid of
the row inserted, updated, or deleted.  Why do you need to know the xid
is a better question.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-general by date:

Previous
From: "Steve - DND"
Date:
Subject: Re: Current transaction ID?
Next
From: "Steve - DND"
Date:
Subject: Re: Current transaction ID?