Re: Usage of epoch in txid_current

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Usage of epoch in txid_current
Дата
Msg-id 20180709234316.lswzqvow3exqbobt@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Usage of epoch in txid_current  (Thomas Munro <thomas.munro@enterprisedb.com>)
Ответы Re: Usage of epoch in txid_current
Список pgsql-hackers
On 2018-07-10 11:35:59 +1200, Thomas Munro wrote:
> I played around with this idea yesterday.  Experiment-grade patch
> attached.

Cool!


> I think it's probably a good idea to make it very explicit when moving
> between big and small transaction IDs, hence the including of the word
> 'big' in variable and function names and the use of a function-like
> macro (rather than implicit conversion, which C doesn't give me a good
> way to prevent).  Otherwise there is a class of bug that is hidden for
> the first 2^32 transactions.

You could have BigTransactionId (maybe renamed to FullTransactionId?) be
a struct type. That'd prevent such issues. Most compilers these days
should be more than good enough to optimize passing around an 8byte
struct by value...

Greetings,

Andres Freund


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: small development tip: Consider using the gold linker
Следующее
От: RK
Дата:
Сообщение: Costing bug in hash join logic for semi joins