Re: Do XID sequences need to be contiguous?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Do XID sequences need to be contiguous?
Дата
Msg-id 32485.1574976354@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Do XID sequences need to be contiguous?  (Mark Dilger <hornschnorter@gmail.com>)
Список pgsql-hackers
Mark Dilger <hornschnorter@gmail.com> writes:
> While working on the problem of XID wraparound within the LISTEN/NOTIFY
> system, I tried to increment XIDs by more than one per transaction. 
> This leads to a number of test failures, many which look like:

IIRC, the XID-creation logic is designed to initialize the next clog
page whenever it allocates an exact-multiple-of-BLCKSZ*4 transaction
number.  Skipping over such numbers would create trouble.

> First, I'd like a good method of burning through transaction ids in
> tests designed to check for problems in XID wrap-around.

Don't "burn through them".  Stop the cluster and use pg_resetwal to
set the XID counter wherever you want it.  (You might need to set it
just before a page or segment boundary; I'm not sure if pg_resetwal
has any logic of its own to initialize a new CLOG page/file when you
move the counter this way.  Perhaps it's worth improving that.)

> Second, I'd like to add Asserts where appropriate regarding this
> assumption.

I'm not excited about that, and it's *certainly* not a problem that
justifies additional configure infrastructure.

            regards, tom lane



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

Предыдущее
От: Alexander Lakhin
Дата:
Сообщение: Re: pg_upgrade fails to preserve old versions of the predefinedcollations
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: checkpointer: PANIC: could not fsync file: No such file or directory