Skip site navigation (1) Skip section navigation (2)

Re: cheaper snapshots

From: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: cheaper snapshots
Date: 2011-07-28 16:48:24
Message-ID: 1311871704.3117.1577.camel@hvost (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Thu, 2011-07-28 at 18:05 +0200, Hannu Krosing wrote:

> But it is also possible, that you can get logically consistent snapshots
> by protecting only some ops. for example, if you protect only insert and
> get snapshot, then the worst that can happen is that you get a snapshot
> that is a few commits older than what youd get with full locking and it
> may well be ok for all real uses.

Thinking more of it, we should lock commit/remove_txid and get_snapshot

having a few more running backends does not make a difference, but
seeing commits in wrong order may.

this will cause contention between commit and get_snapshot, but
hopefully less than current ProcArray manipulation, as there is just one
simple C array to lock and copy.

Hannu Krosing
PostgreSQL Infinite Scalability and Performance Consultant
PG Admin Book:

In response to


pgsql-hackers by date

Next:From: Josh BerkusDate: 2011-07-28 16:53:01
Subject: Re: New partitioning WAS: Check constraints on partition parents only?
Previous:From: Hannu KrosingDate: 2011-07-28 16:08:18
Subject: Re: cheaper snapshots

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group