Re: read stream on amcheck
От | Melanie Plageman |
---|---|
Тема | Re: read stream on amcheck |
Дата | |
Msg-id | CAAKRu_YGe3TATAi8V4Ya=Uwp1NDv3bV3QHYJKurgE-EpzQd5dg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: read stream on amcheck (Matheus Alcantara <matheusssilv97@gmail.com>) |
Ответы |
Re: read stream on amcheck
|
Список | pgsql-hackers |
On Mon, Mar 17, 2025 at 9:47 AM Matheus Alcantara <matheusssilv97@gmail.com> wrote: > > Sorry for the delay, attached v4 with the remaining fixes. Thanks for the patch. I started reviewing this with the intent to commit it. But, I decided while studying it that I want to separate the SKIP_PAGES_NONE case and the other cases into two callbacks. I think it is easier to read the skip pages callback this way. The SKIP_PAGES_NONE case is just read all blocks in the range, so we can use the existing default callback, block_range_read_cb(). Then the callback for the SKIP_PAGES_ALL_VISIBLE and SKIP_PAGES_ALL_FROZEN options can be clear and simple. I've attached two versions with this proposed structure. amcheck-readsteram-1callback.patch implements this with one callback and has the amcheck specific callback private data struct subclass BlockRangeReadStreamPrivate (I called it heapamcheck_rs_perblock_data). amcheck-readstream-2callbacks.patch wraps block_range_read_cb() in an amcheck specific callback and creates a BlockRangeReadStreamPrivate and fills it in from the heapamcheck_rs_perblock_data to pass as callback_private_data. Because this version is more explicit, it is more safe. We don't have any type checking facilities that will alert us if someone adds a member above the BlockRangeReadStreamPrivate in heapamcheck_rs_perblock_data. But, I'm open to feedback. - Melanie
Вложения
В списке pgsql-hackers по дате отправления: