Minor necessary/sufficient slip-up?

Поиск
Список
Период
Сортировка
От PG Doc comments form
Тема Minor necessary/sufficient slip-up?
Дата
Msg-id 175680133226.771.1421809976333381466@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: Minor necessary/sufficient slip-up?
Список pgsql-docs
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/17/routine-vacuuming.html
Description:

This is a most pedantic point, but since the postgres documentation is
incredibly accurate and well written I indulge my pedantry this one time:

Regarding the last sentence of the first paragraph of 24.1.5: I sure hope
vacuuming every table in every database at least once every two billion
transactions is not only necessary to avoid catastrophic data loss, but also
sufficient. Indeed if I understand the subsequent explanation, it is
sufficient but not necessary.

Here is the full paragraph:

24.1.5. Preventing Transaction ID Wraparound Failures
PostgreSQL's MVCC transaction semantics depend on being able to compare
transaction ID (XID) numbers: a row version with an insertion XID greater
than the current transaction's XID is “in the future” and should not be
visible to the current transaction. But since transaction IDs have limited
size (32 bits) a cluster that runs for a long time (more than 4 billion
transactions) would suffer transaction ID wraparound: the XID counter wraps
around to zero, and all of a sudden transactions that were in the past
appear to be in the future — which means their output become invisible. In
short, catastrophic data loss. (Actually the data is still there, but that's
cold comfort if you cannot get at it.) To avoid this, it is necessary to
vacuum every table in every database at least once every two billion
transactions.

Suggested change for the last sentence:
To avoid this, it suffices to vacuum every table in every database at least
once every two billion transactions.

Bets regards,
Knut Bjarte Haus

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