Re: [PATCH] Full support for index LP_DEAD hint bits on standby

Поиск
Список
Период
Сортировка
От Michail Nikolaev
Тема Re: [PATCH] Full support for index LP_DEAD hint bits on standby
Дата
Msg-id CANtu0ohZMHaWJ3NFcggAcCw8EOiwWu_4EYpm7Sc9usGxyPyyVQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Full support for index LP_DEAD hint bits on standby  (Antonin Houska <ah@cybertec.at>)
Ответы Re: [PATCH] Full support for index LP_DEAD hint bits on standby  (Antonin Houska <ah@cybertec.at>)
Список pgsql-hackers
Hello,
Antonin.

> Sorry, I missed the fact that your example can be executed inside BEGIN - END
> block, in which case minRecoveryPoint won't advance after each command.

No, the block is not executed as a single transaction, all commands
are separated transactions (see below)

> Actually I think that a commit record should be replayed
> more often than XLOG_RUNNING_XACTS, shouldn't it?

Yes, but replaying commit records DOES NOT affect minRecoveryPoint in
almost all cases.

UpdateMinRecoveryPoint is called by XLogFlush,  but xact_redo_commit
calls XLogFlush only in two cases:
* DropRelationFiles is called (some relation are dropped)
* If ForceSyncCommit was used on primary - few “heavy” commands, like
DropTableSpace, CreateTableSpace, movedb, etc.

But “regular” commit record is replayed without XLogFlush and, as
result, without UpdateMinRecoveryPoint.

So, in practice, UpdateMinRecoveryPoint is updated in an “async” way
by checkpoint job. This is why there is a sense to call it on
XLOG_RUNNING_XACTS.

Thanks,
Michail.



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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: PG 14 release notes, first draft
Следующее
От: vignesh C
Дата:
Сообщение: Re: Enhanced error message to include hint messages for redundant options error