Re: Unit tests for SLRU

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Unit tests for SLRU
Дата
Msg-id Y3QtM2/KfodfcnEj@paquier.xyz
обсуждение исходный текст
Ответ на Re: Unit tests for SLRU  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-hackers
On Tue, Nov 15, 2022 at 11:39:20AM +0100, Daniel Gustafsson wrote:
> +    /* write given data to the page */
> +    strncpy(TestSlruCtl->shared->page_buffer[slotno], data, BLCKSZ - 1);
>
> Would it make sense to instead use pg_pwrite to closer match the code being
> tested?

Hmm.  I am not exactly sure what we'd gain with that, as it would
imply that we need to write directly to the file using SlruFileName()
after doing ourselves a OpenTransientFile(), duplicating what
SlruPhysicalWritePage() does to create a fd to feed to a pg_pwrite()?
Or I misunderstood your point.
--
Michael

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Slow standby snapshot
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: allowing for control over SET ROLE