Re: lazy snapshots? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: lazy snapshots?
Date
Msg-id 11447.1287631445@sss.pgh.pa.us
Whole thread Raw
In response to Re: lazy snapshots?  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: lazy snapshots?
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Oct 20, 2010 at 10:07 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I'm less than convinced by the hypothesis that most transactions would
>> avoid taking snapshots in this regime, anyway. �It would only hold up
>> if there's little locality of reference in terms of which tuples are
>> getting examined/modified by concurrent transactions, and that's a
>> theory that seems much more likely to be wrong than right.

> There will certainly be workloads where most transactions acquire a
> snapshot, but just to take one obvious example, suppose we have a data
> warehouse where every night we bulk load the day's data, and then we
> run reporting queries all day.  Except during the overnight bulk
> loads, there's no concurrent write activity at all, and thus no need
> for snapshots.

Well, yeah, but in this scenario there's also no contention involved in
taking snapshots --- there are only readers of ProcArray and (IIRC) they
only need shared locks on the array.  If you want to make any meaningful
improvement in this area, you need something that solves the ProcArray
access contention caused by a heavy mixed read/write transaction load.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: lazy snapshots?
Next
From: Peter Eisentraut
Date:
Subject: pg_hba.conf host name wildcard support