On 21.11.2020 04:30, Michael Paquier wrote:
> The only method I can think as being really
> reliable is based on two facts:
> - Do a check only on pd_checksums, as that validates the full contents
> of the page.
> - When doing a retry, make sure that there is no concurrent I/O
> activity in the shared buffers. This requires an API we don't have
> yet.
It seems reasonable to me to rely on checksums only.
As for retry, I think that API for concurrent I/O will be complicated.
Instead, we can introduce a function to read the page directly from
shared buffers after PAGE_RETRY_THRESHOLD attempts. It looks like a
bullet-proof solution to me. Do you see any possible problems with it?
--
Anastasia Lubennikova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company