Re: heapam_index_build_range_scan's anyvisible

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: heapam_index_build_range_scan's anyvisible
Date: 2019-06-07 20:30:33
Message-ID: 20190607203033.GA25330@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-Jun-07, Robert Haas wrote:

> I spent some time today studying heapam_index_build_range_scan and
> quickly reached the conclusion that it's kind of a mess. At heart
> it's pretty simple: loop over all the table, check each tuple against
> any qual, and pass the visible ones to the callback. However, in an
> attempt to make it cater to various needs slightly outside of its
> original design purpose, various warts have been added, and there are
> enough of them now that I at least find it fairly difficult to
> understand. One of those warts is anyvisible, which I gather was
> added in support of BRIN.

Yes, commit 2834855cb9fd added that flag. SnapshotNonVacuumable did not
exist back then. It seems like maybe it would work to remove the flag
and replace with passing SnapshotNonVacuumable. The case that caused
that flag to be added is tested by a dedicated isolation test, so if
BRIN becomes broken by the change at least it'd be obvious ...

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2019-06-07 21:11:33 Re: heapam_index_build_range_scan's anyvisible
Previous Message Robert Haas 2019-06-07 20:18:39 heapam_index_build_range_scan's anyvisible