Re: Skip all-visible pages during second HeapScan of CIC

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Skip all-visible pages during second HeapScan of CIC
Date: 2017-03-08 13:27:30
Message-ID: 20170308132730.GR9812@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Andres Freund (andres(at)anarazel(dot)de) wrote:
> On 2017-03-07 21:38:40 -0500, Robert Haas wrote:
> > > I wonder however, if careful snapshot managment couldn't solve this as
> > > well. I have *not* thought a lot about this, but afaics we can easily
> > > prevent all-visible from being set in cases it'd bother us by having an
> > > "appropriate" xmin / registered snapshot.
> >
> > Yeah, but that's a tax on the whole system.
>
> I'm not sure I can buy that argument. CIC *already* holds a snapshot
> during each of the two scans. By reducing the amount of time that's held
> in the second scan, the systemwide impact is reduced, because it's held
> for a shorter amount of time. We need to hold a slightly "more
> aggressive" snapshot, that's true, but if you have high xid throughput
> those effects should roughly balance each other.

For my 2c, at least, this certainly sounds like a potentially promising
approach too and I tend to agree with Andres on it not really being an
issue to have a more aggressive snapshot for the duration of the CIC.

Thanks!

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-03-08 13:28:21 Re: Adding the optional clause 'AS' in CREATE TRIGGER
Previous Message Robert Haas 2017-03-08 13:25:27 Re: Removing #include "postgres.h" from a couple of headers