Re: lazy snapshots?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: lazy snapshots?
Date: 2010-10-21 03:24:05
Message-ID: 11447.1287631445@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Wed, Oct 20, 2010 at 10:07 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2010-10-21 03:38:55 pg_hba.conf host name wildcard support
Previous Message Robert Haas 2010-10-21 03:11:22 Re: lazy snapshots?