От: Kevin Grittner
Тема: Re: the XID question
Дата: ,
Msg-id: 4D36DBE202000025000397F8@gw.wicourts.gov
(см: обсуждение, исходный текст)
Ответ на: Re: the XID question  (Andres Freund)
Ответы: Re: the XID question  (Greg Smith)
Список: pgsql-performance

Скрыть дерево обсуждения

the XID question  ("Charles.Hou", )
 Re: the XID question  ("Charles.Hou", )
 Re: the XID question  (Filip Rembiałkowski, )
  Re: the XID question  ("Kevin Grittner", )
 Re: the XID question  (Chris Browne, )
  Re: the XID question  (Andres Freund, )
   Re: the XID question  ("Kevin Grittner", )
    Re: the XID question  (Greg Smith, )
 Re: the XID question  ("Charles.Hou", )
  Re: the XID question  ("Kevin Grittner", )
   Re: the XID question  (Robert Haas, )
 Re: the XID question  ("Charles.Hou", )

Andres Freund <> wrote:
> On Wednesday, January 19, 2011 07:06:58 PM Chris Browne wrote:

>> A read-only transaction won't consume XIDs, but if you don't
>> expressly declare it read-only, they're still liable to get
>> eaten...
> No. The Xid is generally only allocated at the first place a real
> xid is needed. See GetCurrentTransactionId, AssignTransactionId in
> xact.c and the caller of the former.

Or just test it in psql.  BEGIN, run your query, look at pg_locks.
If an xid has been assigned, you'll see it there in the
transactionid column.  You can easily satisfy yourself which
statements grab an xid....

-Kevin


В списке pgsql-performance по дате сообщения:

От: Greg Smith
Дата:
Сообщение: Re: the XID question
От: Craig Ringer
Дата:
Сообщение: Re: Migrating to Postgresql and new hardware