Re: Elimination of the repetitive code at the SLRU bootstrap functions.

2025-02-23 Thread Evgeny
Hello hackers! > I think the overall idea here is good, but I didn't like the new > WriteSlruZeroPageXlogRec helper function; it looks too much like a > modularity violation (same for the fact that you have to pass the rmid > and info from each caller into slru.c). I would not do that in slru.c >

Re: Elimination of the repetitive code at the SLRU bootstrap functions.

2025-02-22 Thread Álvaro Herrera
On 2025-Feb-18, Evgeny Voropaev wrote: > Created functions BootStrapSlruPage,SimpleLruZeroAndLogPage, > WriteSlruZeroPageXlogRec. Using of these functions allows to delete > ZeroXYZPage functions, WriteXYZZeroPageXlogRec functions and eliminate code > repetitions. I think the overall idea here is

Re: Elimination of the repetitive code at the SLRU bootstrap functions.

2025-02-18 Thread Evgeny Voropaev
On 17.02.2025 21:00, Álvaro Herrera wrote: On 2025-Feb-17, Andrey Borodin wrote: BootStrapSlruPage() always calls zerofunc(pageno, false) with second argument false. In case of every possible argument (ZeroCLOGPage, ZeroCommitTsPage, ZeroMultiXactOffsetPage, ZeroMultiXactMemberPage, ZeroSUBT

Re: Elimination of the repetitive code at the SLRU bootstrap functions.

2025-02-17 Thread Álvaro Herrera
On 2025-Feb-17, Andrey Borodin wrote: > BootStrapSlruPage() always calls zerofunc(pageno, false) with second argument > false. > In case of every possible argument (ZeroCLOGPage, ZeroCommitTsPage, > ZeroMultiXactOffsetPage, ZeroMultiXactMemberPage, ZeroSUBTRANSPage) it > means just a call to Simp

Re: Elimination of the repetitive code at the SLRU bootstrap functions.

2025-02-17 Thread Andrey Borodin
> On 14 Feb 2025, at 11:54, Evgeny Voropaev > wrote: > > Hi! Nice patch! BootStrapSlruPage() always calls zerofunc(pageno, false) with second argument false. In case of every possible argument (ZeroCLOGPage, ZeroCommitTsPage, ZeroMultiXactOffsetPage, ZeroMultiXactMemberPage, ZeroSUBTRANS

Re: Elimination of the repetitive code at the SLRU bootstrap functions.

2025-02-13 Thread Evgeny Voropaev
ject: [PATCH v2] Elimination of the repetitive code at the SLRU bootstrap functions. The functions bootstrapping SLRU pages used to have a lot of repetitive code. The new realized function BootStrapSlruPage has moved duplicating code into the single place and eliminated code repetitions. Author:

Re: Elimination of the repetitive code at the SLRU bootstrap functions.

2025-02-13 Thread Aleksander Alekseev
Hi Alvaro, > > 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

Re: Elimination of the repetitive code at the SLRU bootstrap functions.

2025-02-13 Thread Álvaro Herrera
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

Re: Elimination of the repetitive code at the SLRU bootstrap functions.

2025-02-13 Thread Aleksander Alekseev
Hi Evgeny, > The functions, bootstrapping SLRU pages, such as BootStrapMultiXact, > BootStrapCLOG, ActivateCommitTs, multixact_redo and others, have a lot > of repetitive code. > > A new proposed function BootStrapSlruPage moves a duplicating code into > the single place. Additionally, a new membe

Elimination of the repetitive code at the SLRU bootstrap functions.

2025-02-12 Thread Evgeny Voropaev
realm of bootstrapping SLRU. Best regards, Evgeny Voropaev, Tantor Labs LLC.From 62762bf4a86af76d845755e41f46714d2b41bbe4 Mon Sep 17 00:00:00 2001 From: Evgeny Voropaev Date: Thu, 13 Feb 2025 12:43:20 +0800 Subject: [PATCH v1] Elimination of the repetitive code at the SLRU bootstrap functions