Re: Transaction Id and status of any operation

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Transaction Id and status of any operation
Дата
Msg-id 1384900514.61511.YahooMailNeo@web162902.mail.bf1.yahoo.com
обсуждение исходный текст
Ответ на Transaction Id and status of any operation  (Rohit Goyal <rhtgyl.87@gmail.com>)
Список pgsql-novice
Rohit Goyal <rhtgyl.87@gmail.com> wrote:

> 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.

From the connection inserting the rows, these functions might help:

http://www.postgresql.org/docs/current/interactive/functions-info.html#FUNCTIONS-TXID-SNAPSHOT

If you want some other connection to figure this out, you might
want to inspect the pg_stat_activity and/or pg_locks views.

http://www.postgresql.org/docs/current/interactive/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW

http://www.postgresql.org/docs/current/interactive/view-pg-locks.html

> 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.

Are you talking about the state and/or waiting columns in
pg_stat_activity, looking to determine when a transaction
completes, or something else?

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


В списке pgsql-novice по дате отправления:

Предыдущее
От: Luca Ferrari
Дата:
Сообщение: Re: Request for information || Begining flow of postgresql
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Transaction Id and status of any operation