Re: Key management with tests

Поиск
Список
Период
Сортировка
От Masahiko Sawada
Тема Re: Key management with tests
Дата
Msg-id CAD21AoD6ncJ1YSibW_64LCiCDs+SxFno0faRBtsCHQWGXmOXrQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Key management with tests  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: Key management with tests  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
On Tue, Jan 12, 2021 at 3:23 AM Stephen Frost <sfrost@snowman.net> wrote:
>
> Greetings,
>
> * Bruce Momjian (bruce@momjian.us) wrote:
> > On Mon, Jan 11, 2021 at 12:54:49PM -0500, Stephen Frost wrote:
> > > Although, another approach and one that I've discussed a bit with Bruce,
> > > is to have more keys- such as a key for temporary files, and perhaps
> > > even a key for logged relations and a different for unlogged..  Or
> >
> > Yes, we have to make sure the nonce (computed as LSN/pageno) is never
> > reused, so if we have several LSN usage "spaces", they need different
> > data keys.
>
> Right, or ensure that the actual IV used is distinct (such as by using
> another bit in the IV to distinguish logged-vs-unlogged), but it seems
> saner to just use a different key, ultimately.

Agreed.

I think we also need to consider how to make sure nonce is unique when
making a page dirty by updating hint bits. Hint bit update changes the
page contents but doesn't change the page lsn if we already write a
full page write. In the PoC patch, I logged a dummy WAL record
(XLOG_NOOP) just to move the page lsn forward, but since this is
required even when changing the page is not the first time since the
last checkpoint we might end up logging too many dummy WAL records.

Regards,

-- 
Masahiko Sawada
EnterpriseDB:  https://www.enterprisedb.com/



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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Outdated replication protocol error?
Следующее
От: Keisuke Kuroda
Дата:
Сообщение: Re: Huge memory consumption on partitioned table with FKs