Re: why does txid_current() assign new transaction-id?

Поиск
Список
Период
Сортировка
От Naoya Anzai
Тема Re: why does txid_current() assign new transaction-id?
Дата
Msg-id 116262CF971C844FB6E793F8809B51C6E8D538@BPXM02GP.gisp.nec.co.jp
обсуждение исходный текст
Ответ на Re: why does txid_current() assign new transaction-id?  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: why does txid_current() assign new transaction-id?  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
Thank you for comments.

I understand your points.

For only to read a current transaction-id, I know we just have to use
txid_current_snapshot and that is a best way, but I feel a little bit
hassle to explain columns of txid_current_snapshot for my supporting customers..
(Xmin is .... and Xmax is ....) ..

> txid_current has had the behavior of assigning a new transaction XID
> when one is not assigned since its introduction. I don't think that it
> is wise to change it now the way you do as many applications surely
> rely on this assumption. Perhaps we could make the documentation
> clearer about those things though, changing the description of this
> function to "get current transaction ID, and assign a new one if one
> is not assigned yet":
> http://www.postgresql.org/docs/devel/static/functions-info.html
+1

I think that a description of txid_current is too rough and it might
be confused some users.
txid_current is a different operation depending on session situations,
I feel if detail of txid_current is documented then it will be better.

For example...
Inside of the transaction-block(begin..end), returns a transaction-id used by this block.
Outside of the transaction-block, returns a next transaction-id(but it is consumed by this function).

Regards,

Naoya

---
Naoya Anzai
Engineering Department
NEC Solution Inovetors, Ltd.
E-Mail: nao-anzai@xc.jp.nec.com
---






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

Предыдущее
От: Dean Rasheed
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Row-Level Security Policies (RLS)
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: about lob(idea)