From: | Matheus Alcantara <matheusssilv97(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | read stream on amcheck |
Date: | 2025-01-02 15:29:30 |
Message-ID: | CAFY6G8eLyz7+sccegZYFj=5tAUR-GZ9uEq4Ch5gvwKqUwb_hCA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
While reviewing some other patches implementing stream API for core subsystems,
I noticed that the amcheck extension could also benefit from that.
Notice the refactor when handling the "skip" parameter; The logic was moved to
the heapam_read_stream_next_block callback so that verify_heapam don't need to
touch any private field of heapam_read_stream_next_block_private struct.
One other think to mention is that the test cases of "skip" parameter
that I've seen just test when the first page is corrupted, so I think
that a carefully review on callback logic would be good to ensure that
we don't accidentally skip a page when doing p->current_blocknum++;
This patch doesn't show any performance improvements (or regression)
but I think that it would be good to replace the ReadBufferExtended
usage with the read stream API, so in the future it could be benefit
from the AIO project.
--
Matheus Alcantara
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Use-read-stream-on-amcheck.patch | application/octet-stream | 4.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2025-01-02 15:38:29 | Re: Strange issue with NFS mounted PGDATA on ugreen NAS |
Previous Message | Daniel Gustafsson | 2025-01-02 15:28:50 | Re: Modern SHA2- based password hashes for pgcrypto |