Re: Transaction Id and status of any operation

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Rohit Goyal <rhtgyl(dot)87(at)gmail(dot)com>
Cc: pgsql novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Transaction Id and status of any operation
Date: 2013-11-19 23:51:39
Message-ID: CAHyXU0z0A-dnr4PW7u27+soh1xTznGmK4=cbNmZkMuZ=YW3u1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tue, Nov 19, 2013 at 2:49 AM, Rohit Goyal <rhtgyl(dot)87(at)gmail(dot)com> wrote:
> Hi All,
>
> I want to know the file or function from code which can give me the
> transaction Id and its status. For example I want to find the details of
> transaction currently inserting on some specific table.
>
> Also please tel me what function are called to check whether status of
> transaction has changed. For example, I would like to get notified whenever
> the status of any transaction changes. Please tel me the files or function
> for this.

Generally speaking, per MVCC rules, transactions can only see other
transactions if they completed. It is up to the application to manage
what to do when a transaction fails.

There are internal C APIs (see: transam.c) to query transaction
success through the clog system but I'm suspicious that this is the
wrong line of thinking for you. Stepping back, what are you trying to
do?

merlin

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Amit Langote 2013-11-20 04:49:27 Re: B tree index || function information
Previous Message Kevin Grittner 2013-11-19 22:35:14 Re: Transaction Id and status of any operation