Re: Postgresql 9.5 committing and log sequence number

Поиск
Список
Период
Сортировка
Искать
От
Albe Laurenz
Тема
Re: Postgresql 9.5 committing and log sequence number
Дата
Msg-id
A737B7A37273E048B164557ADEF4A58B5397E74D@ntex2010i.host.magwien.gv.at
Ответ на
Список
Дерево обсуждения
Postgresql 9.5 committing and log sequence number Poul Kristensen <bcc5226@gmail.com>
Re: Postgresql 9.5 committing and log sequence number Albe Laurenz <laurenz.albe@wien.gv.at>
Re: Postgresql 9.5 committing and log sequence number Poul Kristensen <bcc5226@gmail.com>
Re: Postgresql 9.5 committing and log sequence number Albe Laurenz <laurenz.albe@wien.gv.at>
Poul Kristensen wrote:
> How come that repeating
> SELECT txid_current();
> 
> makes 1 added to xid
> shown by
> select * from pg_last_committed_xact();
> 
> 
> repeating
> 
> select * from pg_last_committed_xact();
> 
> does not add 1 for each repeat of
> select * from pg_last_committed_xact();

The documentation says about txid_current():

  get current transaction ID, assigning a new one if the current transaction
  does not have one

Since the query runs in ist own transaction, each invocation
will assign a new transaction ID.

Yours,
Laurenz Albe
В списке pgsql-admin по дате отправления
От: Poul Kristensen
Дата:
От: Campbell, Lance
Дата:
FAQ