Re: Unit tests for SLRU
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Aleksander Alekseev <aleksander@timescale.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Michael Paquier <michael@paquier.xyz>,
Pavel Borisov <pashkin.elfe@gmail.com>,
Peter Eisentraut <peter.eisentraut@enterprisedb.com>,
Maxim Orlov <orlovmg@gmail.com>,
Noah Misch <noah@leadboat.com>
Date: 2022-11-15T10:39:20Z
Lists: 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/
Commits
-
Add test module for SLRUs
- 006b69fd912b 16.0 landed
-
Fix comment of SimpleLruInit() in slru.c
- 9e0321135cae 14.7 landed
- 5962c8cbe5a6 15.2 landed
- 5ca3645cb3fb 16.0 landed