Why latestRemovedXid|cuteoff_xid are always sent?

Поиск
Список
Период
Сортировка
От Michail Nikolaev
Тема Why latestRemovedXid|cuteoff_xid are always sent?
Дата
Msg-id CANtu0oigC0+H0UkxktyovdLLU67ikM0+Dw3J4EQqiDDeGhcwsQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Why latestRemovedXid|cuteoff_xid are always sent?  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
Hello, hackers.

Working on some stuff, I realized I do not understand why
latestRemovedXid|cuteoff_xid (in different types of WAL records) are
sent every time they appear on the primary side.

latestRemovedXid|cuteoff_xid is used to call
ResolveRecoveryConflictWithSnapshot and cancel conflicting backend on
Standby. In some of the cases, snapshot conflict resolving is the only
work REDO does (heap_xlog_cleanup_info
 or btree_xlog_reuse_page, for example).

Could we try to somehow optimistically advance the latest sent
latestRemovedXid value in shared memory on the primary and skip
sending it if the newer xid was sent already? In such a way we could
reduce the number of ResolveRecoveryConflictWithSnapshot calls on
Standby and even skip some WAL records.

At least we could do the same optimization on the standby side
(skipping ResolveRecoveryConflictWithSnapshot if it was called with
newer xid already).

Is it a sane idea or I have missed something huge?

Thanks,
Michail.



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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Move --data-checksums to common options in initdb --help
Следующее
От: Andrey Borodin
Дата:
Сообщение: Re: archive status ".ready" files may be created too early