Re: read stream on amcheck

From: Matheus Alcantara <matheusssilv97(at)gmail(dot)com>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: read stream on amcheck
Date: 2025-01-02 17:53:15
Message-ID: CAFY6G8e9yO=37HQn2fcfFqr3zFJ9R1BtkbmU-7-w563aemymKw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks for reviewing!

Em qui., 2 de jan. de 2025 às 13:16, Kirill Reshke
<reshkekirill(at)gmail(dot)com> escreveu:
>
> However, this:
>
> >- if (skip_option == SKIP_PAGES_ALL_FROZEN)
> >- {
> >- if ((mapbits & VISIBILITYMAP_ALL_FROZEN) != 0)
> >- continue;
> >- }
> >-
> >- if (skip_option == SKIP_PAGES_ALL_VISIBLE)
> >- {
> >- if ((mapbits & VISIBILITYMAP_ALL_VISIBLE) != 0)
> >- continue;
> >- }
>
> changes to this
> (in heapam_read_stream_next_block)
> >+
> >+ if ((p->skip_option == SKIP_PAGES_ALL_FROZEN && (mapbts & VISIBILITYMAP_ALL_FROZEN) != 0) ||
> >+ (p->skip_option == SKIP_PAGES_ALL_VISIBLE && (mapbts & VISIBILITYMAP_ALL_VISIBLE) != 0))
> > + continue;
>
> I don't understand this change. The patch aims to be purely applying
> streaming API, not refactoring. And if we refactor this code, this is
> less readable than it was.

Yeap, I agree. Attached a v2 fixed.

--
Matheus Alcantara

Attachment Content-Type Size
v2-0001-Use-read-stream-on-amcheck.patch application/octet-stream 4.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey M. Borodin 2025-01-02 18:12:37 Re: Switching XLog source from archive to streaming when primary available
Previous Message Amul Sul 2025-01-02 16:49:13 Allow NOT VALID foreign key constraints on partitioned tables.