Re: RecoveryInProgress() has critical side effects

Поиск
Список
Период
Сортировка
Искать
От
Bossart, Nathan
Тема
Re: RecoveryInProgress() has critical side effects
Дата
Msg-id
DBF5D5C0-5A25-4181-956E-E1D3C9FAC1C8@amazon.com
Ответ на
Список
Дерево обсуждения
RecoveryInProgress() has critical side effects Robert Haas <robertmhaas@gmail.com>
Re: RecoveryInProgress() has critical side effects Andres Freund <andres@anarazel.de>
Re: RecoveryInProgress() has critical side effects "Bossart, Nathan" <bossartn@amazon.com>
Re: RecoveryInProgress() has critical side effects Robert Haas <robertmhaas@gmail.com>
Re: RecoveryInProgress() has critical side effects Andres Freund <andres@anarazel.de>
Re: RecoveryInProgress() has critical side effects Robert Haas <robertmhaas@gmail.com>
Re: RecoveryInProgress() has critical side effects Andres Freund <andres@anarazel.de>
Re: RecoveryInProgress() has critical side effects Robert Haas <robertmhaas@gmail.com>
Re: RecoveryInProgress() has critical side effects Andres Freund <andres@anarazel.de>
Re: RecoveryInProgress() has critical side effects Heikki Linnakangas <hlinnaka@iki.fi>
Re: RecoveryInProgress() has critical side effects Robert Haas <robertmhaas@gmail.com>
Re: RecoveryInProgress() has critical side effects Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: RecoveryInProgress() has critical side effects "Bossart, Nathan" <bossartn@amazon.com>
Re: RecoveryInProgress() has critical side effects Michael Paquier <michael@paquier.xyz>
Re: RecoveryInProgress() has critical side effects Robert Haas <robertmhaas@gmail.com>
Re: RecoveryInProgress() has critical side effects Michael Paquier <michael@paquier.xyz>
Re: RecoveryInProgress() has critical side effects Robert Haas <robertmhaas@gmail.com>
Re: RecoveryInProgress() has critical side effects Robert Haas <robertmhaas@gmail.com>
On 11/11/21, 9:20 AM, "Robert Haas"  wrote:
> memory, and not much is lost if they are set up and not used. So, in
> 0001, I propose to move the call to InitXLogInsert() from
> InitXLOGAccess() to BaseInit(). That means every backend will do it
> the first time it starts up. It also means that CreateCheckPoint()
> will no longer need a special case call to InitXLogInsert(), which
> seems like a good thing.

0001 looks reasonable to me.

> connected. However, it does have the effect of introducing a branch
> into GetFullPageWritesInfo(), which I'm not 100% sure is cheap enough
> not to matter. I think the obvious alternative is to just not
> initialize RedoRecPtr and doPageWrites at all and document in the
> comments that the first time each backend does something with them
> it's going to end up retrying once; perhaps that is preferable. Going

Unless there's a demonstrable performance benefit from adding the
branch, my preference is to leave it out.  I could be off-base, but it
seems possible that future changes might end up depending on any side
effects from this new branch, which is exactly what you're trying to
fix.  Plus, always using the retry path is a good way to test that it
works as expected.

Nathan

В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Tom Lane
Дата:
Сообщение: Re: Test::More version
FAQ