Re: attempted to lock invisible tuple - PG 8.4.1 - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: attempted to lock invisible tuple - PG 8.4.1
Date
Msg-id 20091006191655.GR5929@alvh.no-ip.org
Whole thread Raw
In response to Re: attempted to lock invisible tuple - PG 8.4.1  (Alvaro Herrera <alvherre@commandprompt.com>)
List 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

pgsql-general by date:

Previous
From: Sachin Srivastava
Date:
Subject: Re: initdb failing
Next
From: Richard Huxton
Date:
Subject: Re: Wishlist of PL/Perl Enhancements for PostgreSQL 8.5