Re: storing an explicit nonce

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: storing an explicit nonce
Дата
Msg-id 20210526234629.oj7bwwdzl2d2tu3u@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: storing an explicit nonce  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: storing an explicit nonce  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Hi,

On 2021-05-25 22:23:46 -0400, Stephen Frost wrote:
> Andres mentioned other possible cases where the LSN doesn’t change even
> though we change the page and, as he’s probably right, we would have to
> figure out a solution in those cases too (potentially including cases like
> crash recovery or replay on a replica where we can’t really just go around
> creating dummy WAL records to get new LSNs..).

Yea, I think there's quite a few of those. For one, we don't guarantee
that that the hole between pd_lower/upper is zeroes. It e.g. contains
old tuple data after deleted tuples are pruned away. But when logging an
FPI, we omit that range. Which means that after crash recovery the area
is zeroed out. There's several cases where padding can result in the
same.

Just look at checkXLogConsistency(), heap_mask() et al for all the
differences that can occur and that need to be ignored for the recovery
consistency checking to work.

Particularly the hole issue seems trivial to exploit, because we know
the plaintext of the hole after crash recovery (0s).


I don't see how using the LSN alone is salvagable.


Greetings,

Andres Freund



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Move pg_attribute.attcompression to earlier in struct for reduced size?
Следующее
От: Andres Freund
Дата:
Сообщение: Re: storing an explicit nonce