Re: brin index vacuum versus transaction snapshots - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: brin index vacuum versus transaction snapshots
Date
Msg-id 20150804220017.GX2441@postgresql.org
Whole thread Raw
In response to Re: brin index vacuum versus transaction snapshots  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: brin index vacuum versus transaction snapshots  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Alvaro Herrera wrote:

> Thankfully I found
> another way to solve it, which is to forgo usage of MVCC here and
> instead use SnapshotAny.  There's already a mode in
> IndexBuildHeapRangeScan that uses SnapshotAny, but it needs some tweaks
> to do what we need.  I'm going to propose a patch along those lines
> shortly.

Here's the promised patch.  Includes a new isolation test (which fails
with the old code in two ways: first when using VACUUM it causes the
error message Kevin didn't like to be raised; second when using
brin_summarize_new_values it causes the inserted tuple to not be part of
the summary, which is wrong).  This test leaves the pageinspect
extension installed in the isolationtest database, but that seems fine
to me.  (No other isolation test installs an extension.)

The error message Kevin complained about is gone, as is some related
commentary.  This is replaced by tweaks in IndexBuildHeapRangeScan that
know to do a SnapshotAny scan without being noisy about in progress
insertions/deletions.

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

Attachment

pgsql-hackers by date:

Previous
From: Ewan Higgs
Date:
Subject: Re: [sqlsmith] Failed assertion in joinrels.c
Next
From: Alvaro Herrera
Date:
Subject: Re: [DOCS] max_worker_processes on the standby