From: | Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Evgeny Voropaev <evorop(dot)wiki(at)gmail(dot)com> |
Cc: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Evgeny <evorop(at)gmail(dot)com>, Evgeny Voropaev <evgeny(dot)voropaev(at)tantorlabs(dot)com>, Aleksander Alekseev <aleksander(at)timescale(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Elimination of the repetitive code at the SLRU bootstrap functions. |
Date: | 2025-03-13 12:49:20 |
Message-ID: | 202503131249.4kaqj2dnwv6b@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello
I think this is going too far. The new function BootStrapSlruPage() now
is being used for things other than bootstrapping, and that doesn't seem
appropriate to me. I think we should leave the things that aren't
bootstrap out of this patch. For instance, ExtendCLOG was more
understandable before this patch than after. Same with
ExtendMultiXact{Offset,Member}, ExtendSUBTRANS, etc.
By removing these changes, you can remove the third argument to
BootStrapSlruPage (the function pointer), since you don't need it.
I'm also very suspicious of the use of the new function in the redo
routines also, because those are not bootstrapping anything. I'd rather
have another routine, say SimpleLruRedoZeroPage() which only handles the
zeroing of a page from a WAL record. It would be very similar to
BootstrapSlruPage, and maybe they can share an internal "workhorse"
function for the bits that are common.
I don't have faith in the function name XLogInsertInt64(). The datatype
has no role there. I liked my proposal better.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2025-03-13 12:51:29 | Re: Row pattern recognition |
Previous Message | Peter Eisentraut | 2025-03-13 12:43:30 | Re: pg_attribute_noreturn(), MSVC, C11 |