From: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
---|---|
To: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Remove custom redundant full page write description from GIN |
Date: | 2025-09-26 11:39:21 |
Message-ID: | CALdSSPgnAt5L=D_xGXRXLYO5FK1H31_eYEESxdU1n-r4g+6GqA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, 15 Sept 2025 at 18:27, Andrey Borodin <x4mmm(at)yandex-team(dot)ru> wrote:
>
>
>
> > On 15 Sep 2025, at 17:56, Kirill Reshke <reshkekirill(at)gmail(dot)com> wrote:
> >
> > I suggest removing this custom FPW support.
>
> I agree that extra message adds no value. Generic FPW message has the same "for verification" details too.
> I've checked if there are any other similar cases, but found non FPW indications in other resource managers.
Thanks for review
> Maybe a litter comment about why we don't describe anything in presence of FPW would be good. But nearby code is not very verbose...
>
I dunno. Looks like after removing code, this comment about FPW will
be just out of place. We already have documentation about pg_waldump
in general, don't we?
By the way, I have spotted a few new places which can be enhanced in
GIN redo & waldump.
PFA V2 series.
0001:
Basically same as v1-0001
0002:
During my work, I have to modify GIN pg_waldump to get more
information about some wal records. In v2-0002 there are two
modifications in XLOG_GIN_UPDATE_META_PAGE and
XLOG_GIN_INSERT_LISTPAGE, which has added the most value (for me). I
also used to display meta-page info, but I discarded this custom info
display logic, as it adds little value(is it?)
0003:
Small nitpick. I copy-pasted this code from pg core to my cpp project
and the compiler noticed the `payload` variable was not used after the
last modification. I find this true.
0004:
Remove the RelFileLocator field of ginxlogUpdateMeta walrecord. It is
not used in relay logic.
0005:
Small nitpicky patch to document ginxlogInsertListPage's backup blocks.
0006:
CREATE_PTREE always includes page contents in its walrecord on HEAD
(correct me if i'm wrong, but this is what I see in source and in
by-hand testing). In this patch I completely removes
XLOG_GIN_CREATE_PTREE custom logic and replace it with a general FPW
mechanism.
This patch reduces wal record size in case wal_compression is enabled.
Before 0006:
```
reshke(at)yezzey-cbdb-bench:~$ /home/reshke/pg19/bin/bin/pg_waldump -f
-r GIN db/pg_wal/000000010000000000000005 | grep create_p -i
rmgr: Gin len (rec/tot): 8117/ 8117, tx: 831, lsn:
0/05AF9B18, prev 0/05AF9A98, desc: CREATE_PTREE size: 8064, blkref #0:
rel 1663/16384/16541 blk 517
rmgr: Gin len (rec/tot): 8117/ 8117, tx: 831, lsn:
0/05B13078, prev 0/05B13030, desc: CREATE_PTREE size: 8064, blkref #0:
rel 1663/16384/16541 blk 525
rmgr: Gin len (rec/tot): 8117/ 8117, tx: 831, lsn:
0/05B2C5D8, prev 0/05B2C590, desc: CREATE_PTREE size: 8064, blkref #0:
rel 1663/16384/16541 blk 533
rmgr: Gin len (rec/tot): 8117/ 8117, tx: 831, lsn:
0/05B45B20, prev 0/05B45AD8, desc: CREATE_PTREE size: 8064, blkref #0:
rel 1663/16384/16541 blk 541
```
After 0006:
```
reshke(at)yezzey-cbdb-bench:~$ /home/reshke/pg19/bin/bin/pg_waldump -f
-r GIN db/pg_wal/000000010000000000000004 | grep CREATE
rmgr: Gin len (rec/tot): 51/ 410, tx: 795, lsn:
0/041FE560, prev 0/041FE4E0, desc: CREATE_PTREE , blkref #0: rel
1663/16384/16527 blk 517 FPW
rmgr: Gin len (rec/tot): 51/ 410, tx: 795, lsn:
0/042000B8, prev 0/04200070, desc: CREATE_PTREE , blkref #0: rel
1663/16384/16527 blk 525 FPW
rmgr: Gin len (rec/tot): 51/ 410, tx: 795, lsn:
0/04201BF8, prev 0/04201BB0, desc: CREATE_PTREE , blkref #0: rel
1663/16384/16527 blk 533 FPW
rmgr: Gin len (rec/tot): 51/ 410, tx: 795, lsn:
0/04203750, prev 0/04203708, desc: CREATE_PTREE , blkref #0: rel
1663/16384/16527 blk 541 FPW
```
Size reduced 8117-> 410 bytes.
WDYT?
--
Best regards,
Kirill Reshke
Attachment | Content-Type | Size |
---|---|---|
v2-0002-Better-gin-pg_waldump.patch | application/octet-stream | 1.3 KB |
v2-0004-Remove-locator.patch | application/octet-stream | 2.2 KB |
v2-0003-fix-oversight-of-631118fe1e8f.patch | application/octet-stream | 733 bytes |
v2-0001-Remove-custom-full-page-write-decribption-from-GI.patch | application/octet-stream | 1.6 KB |
v2-0005-Add-comment-to-ginxlogInsertListPage.patch | application/octet-stream | 695 bytes |
v2-0006-Remove-custom-logic-for-ginxlogCreatePostingTree-.patch | application/octet-stream | 2.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2025-09-26 11:50:10 | Re: Mark function arguments of type "Datum *" as "const Datum *" where possible |
Previous Message | Shlok Kyal | 2025-09-26 11:35:54 | Re: How can end users know the cause of LR slot sync delays? |