Re: transaction wraparound

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: transaction wraparound
Дата
Msg-id 3851beb5088b05df17862ea70bc90e92a37c1d8a.camel@cybertec.at
обсуждение исходный текст
Список pgsql-novice
On Thu, 2019-10-31 at 10:15 +0300, Павел Ерёмин wrote:
> I have a question about transaction wraparound. As far as I know, transaction
> numbers are 32 bit, which greatly limits their number. In the tuple header
> there are now  t_xmin and  t_xmax fields -
> both 32 bits each. So why not replace them with a single field with a transaction
> number of 64 bits length - this is the transaction number that created the version
> ( this is exactly what the MS SQL server does)? In this case, you do not have to
> lengthen header tuple. Of course, this can result in increased I/O, so to
> compensate for it, you can turn off buffered read (O_DIRECT) while reading.

This is certainly well-intended, but you got several things wrong:

- *both* xmin and xmax contain a transaction number, the first is the
  transaction that created the tuple, the second the transaction that
  marked it invalid.

- Apart from the above, I don't see how this or using direct I/O
  would affect the I/O load.

There is certainly room for improvement, and 64-bit txid's would be nice,
but a lot of smart people who understand PostgreSQL well have already
racked their brains on questions like this, so if there were a simple,
obvious solution, it would probably already have been implemented.

You should search the hacker's list archives for previous discussions
about extending the txid counter, that will be instructive.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




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

Предыдущее
От: Andreas Kretschmer
Дата:
Сообщение: Re: transaction wraparound
Следующее
От: Marcel Ruff
Дата:
Сообщение: PostgreSQL 12 crash with segmentation violation