Re: Unit tests for SLRU

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Maxim Orlov <orlovmg(at)gmail(dot)com>, Noah Misch <noah(at)leadboat(dot)com>
Subject: Re: Unit tests for SLRU
Date: 2022-11-15 10:39:20
Message-ID: 65EFC7A1-B9C5-42F5-9ADA-D88792AB9340@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 15 Nov 2022, at 11:15, Aleksander Alekseev <aleksander(at)timescale(dot)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/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2022-11-15 10:41:05 Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL
Previous Message David Rowley 2022-11-15 10:36:53 Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment