Re: Re: Optimize crash recovery

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Re: Optimize crash recovery
Дата
Msg-id 20200313163058.GA9473@alvherre.pgsql
обсуждение исходный текст
Ответ на Re:Re: Optimize crash recovery  (Thunder <thunder1@126.com>)
Ответы Re: Re: Optimize crash recovery  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
On 2020-Mar-14, Thunder wrote:

> For example, if page lsn in storage is 0x90000 and start to replay from 0x10000.
> If 0x10000 is full-page xlog record, then we can ignore to replay xlog between 0x10000~0x90000 for this page.
> 
> 
> Is there any correct issue if the page exists in the buffer pool and
> ignore to replay for full-page or init page if page lsn is larger than
> the lsn of xlog record?

Oh! right.  The assumption, before we had page-level checksums, was that
the page at LSN 0x90000 could have been partially written, so the upper
half of the contents would actually be older and thus restoring the FPI
(and all subsequent WAL changes) was mandatory.  But if the page
checksum verifies, then there's no need to return the page back to an
old state only to replay everything to bring it to the new state again.

This seems a potentially worthwhile optimization ...

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: BEFORE ROW triggers for partitioned tables
Следующее
От: Paul A Jungwirth
Дата:
Сообщение: Re: range_agg