Re: Locks on temp table and PREPARE

From: Emmanuel Cecchet <manu(at)frogthinker(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Locks on temp table and PREPARE
Date: 2009-06-03 20:50:46
Message-ID: 4A26E226.1000706@frogthinker.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> True, but the problem is that the tuple might still be live to (some
> snapshots in) that transaction, so we can't inject a duplicate tuple
> without risking confusing it. In this particular case that isn't an
> issue because the transaction is done executing, but the tqual.c
> rules don't know that.
>
Please excuse my ignorance. I am not sure to get how the tuple could
still be live to some snapshots after the transaction has prepared. What
could still happen to objects that were only visible to a transaction
after it has prepared? An example would definitely help.
Is it possible in Postgres for a transaction to see an object that was
created inside another transaction before it commits (assuming at least
'read committed' of course)?

Thanks again,
Emmanuel

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-06-03 20:50:49 Improving the ngettext() patch
Previous Message Kevin Grittner 2009-06-03 20:42:11 Re: Plan time Improvement - 64bit bitmapset