why does txid_current() assign new transaction-id?

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

I have a question about txid_current().
it is "Why does txid_current() assign new transaction-id?".

When we executes txid_current() outside of transaction block, it assigns new transaction-id.
I guess it doesn't need to assign a new txid because txid_current() is just a read-only function.

I found a replaceable function by walking through pg-code, that is GetStableLatestTransactionId(void).

I attached a patch which changing just 1-line.
Could you please check the code?

Regards,

Naoya

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


Вложения

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Run pgindent now?
Следующее
От: Andres Freund
Дата:
Сообщение: Re: fsync-pgdata-on-recovery tries to write to more files than previously