Re: Unit tests for SLRU - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Unit tests for SLRU
Date
Msg-id 65EFC7A1-B9C5-42F5-9ADA-D88792AB9340@yesql.se
Whole thread Raw
In response to Re: Unit tests for SLRU  (Aleksander Alekseev <aleksander@timescale.com>)
Responses Re: Unit tests for SLRU
List pgsql-hackers
> On 15 Nov 2022, at 11:15, Aleksander Alekseev <aleksander@timescale.com> wrote:

>> What do you think?
>
> It looks much better than before. I replaced strcpy() with strncpy()
> and pgindent'ed the code.

+    /* 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?

> Other than that to me it looks ready to be committed.

Agreed, reading over it nothing sticks out.

--
Daniel Gustafsson        https://vmware.com/




pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment
Next
From: Bharath Rupireddy
Date:
Subject: Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL