Re: Overhauling "Routine Vacuuming" docs, particularly its handling of freezing

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Overhauling "Routine Vacuuming" docs, particularly its handling of freezing
Дата
Msg-id CAH2-Wzkr8WTGnpoc+zxHAbPTeuWm77Yx0XT4QtQCpW7KS4nuRg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Overhauling "Routine Vacuuming" docs, particularly its handling of freezing  (Maciek Sakrejda <m.sakrejda@gmail.com>)
Список pgsql-hackers
On Mon, May 1, 2023 at 12:03 PM Maciek Sakrejda <m.sakrejda@gmail.com> wrote:
> I don't want to put words into Peter's mouth, but I think that he's arguing that the term "wraparound" suggests that
thereis something special about the transition between xid 2^32 and xid 0 (or, well, 3). There isn't. 

Yes, that's exactly what I mean. There are two points that seem to be
very much in tension here:

1. The scenario where you corrupt the database in single user mode by
unsafely allocating XIDs (you need single user mode to bypass the
xidStopLimit protections) generally won't involve unsigned integer
wraparound (and if it does it's *entirely* incidental to the data
corruption).

2. Actual unsigned integer wraparound is 100% harmless and routine, by design.

So why do we use the term wraparound as a synonym of "the end of the
world"? I assume that it's just an artefact of how the system worked
before the invention of freezing. Back then, you had to do a dump and
restore when the system reached about 4 billion XIDs. Wraparound
really did mean "the end of the world" over 20 years ago.

This is related to my preference for explaining the issues with
reference to a 64-bit XID space. Today we compare 64-bit XIDs using
simple unsigned integer comparisons. That's the same way that 32-bit
XID comparisons worked before freezing was invented in 2001. So it
really does seem like the natural way to explain it.

--
Peter Geoghegan



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

Предыдущее
От: Maciek Sakrejda
Дата:
Сообщение: Re: Overhauling "Routine Vacuuming" docs, particularly its handling of freezing
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Support % wildcard in extension upgrade filenames