Re: attempted to lock invisible tuple - PG 8.4.1

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Stuart Bishop <stuart(at)stuartbishop(dot)net>
Cc: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>, pgsql-general(at)postgresql(dot)org
Subject: Re: attempted to lock invisible tuple - PG 8.4.1
Date: 2009-10-06 19:16:55
Message-ID: 20091006191655.GR5929@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alvaro Herrera wrote:
> I think the previous patch to snapmgr.c was mistaken. Instead of fixing
> a single trouble spot, we're better off fixing PushActiveSnapshot so
> that any use of it that involves a snapshot that's subject to a future
> command counter update should create a new copy.

For a while I was thinking this was useless, because surely
CurrentSnapshot would always be pointing to static storage, no?
However I realized that this is not the case in serializable
transactions, because such transaction need to register the current
snapshot and thus it creates a copy of it. So the problem is that in a
serializable snapshot, ActiveSnapshot may be pointing to the exact same
copy that a CommandCounterIncrement would modify.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2009-10-06 19:45:26 Re: Wishlist of PL/Perl Enhancements for PostgreSQL 8.5
Previous Message Sachin Srivastava 2009-10-06 19:09:11 Re: initdb failing