Re: Standalone backends run StartupXLOG in an incorrect environment

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Standalone backends run StartupXLOG in an incorrect environment
Дата
Msg-id 5628.1271708318@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Standalone backends run StartupXLOG in an incorrect environment  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
BTW, just for the archives' sake: it took a good long time to develop a
reproducible test case for this.  It seems that 99% of the WAL replay
code does *not* depend on the missing state.  I was eventually able to
reproduce the case originally reported, namely a crash during
btree_xlog_cleanup; but to get that you need (a) WAL to end between a
btree page split and insertion of the new parent record, and (b) have
the resulting insertion need to obtain a new btree page, ie there's
another split or newroot forced then, and (c) not have any available
pages in the index's FSM, so that we have to LockRelationForExtension,
which is what crashes for lack of a PGPROC.

So that probably explains why we went so long without recognizing the
bug.

This again points up the fact that WAL recovery isn't as well tested
as one could wish.  Koichi-san's efforts to create a test with 100%
coverage of all types of WAL records are good, but that'd not have
helped us to find this.  We should think about ways to provide better
test coverage of end-of-WAL cleanup.
        regards, tom lane


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Standalone backends run StartupXLOG in an incorrect environment
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Thoughts on pg_hba.conf rejection