Re: Elimination of the repetitive code at the SLRU bootstrap functions. - Mailing list pgsql-hackers

From Álvaro Herrera
Subject Re: Elimination of the repetitive code at the SLRU bootstrap functions.
Date
Msg-id 202502131321.2sqov6eica6u@alvherre.pgsql
Whole thread Raw
In response to Re: Elimination of the repetitive code at the SLRU bootstrap functions.  (Aleksander Alekseev <aleksander@timescale.com>)
Responses Re: Elimination of the repetitive code at the SLRU bootstrap functions.
List pgsql-hackers
On 2025-Feb-13, Aleksander Alekseev wrote:

> Since BootStrapSlruPage() is the only caller of ZeroPage() it seems to
> me that it merely wastes space in SlruCtlData. On top of that I'm not
> 100% sure if all the supported platforms have C99 compilers with
> designated initializers support.

They do -- we use them quite extensively nowadays.

> Wouldn't it be simpler to pass the callback straight to
> BootStrapSlruPage()?

Yeah, maybe this would be easier.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Just treat us the way you want to be treated + some extra allowance
 for ignorance."                                    (Michael Brusser)



pgsql-hackers by date:

Previous
From: Nazir Bilal Yavuz
Date:
Subject: Re: Adding NetBSD and OpenBSD to Postgres CI
Next
From: Aleksander Alekseev
Date:
Subject: Re: Elimination of the repetitive code at the SLRU bootstrap functions.