Re: Locks on temp table and PREPARE - Mailing list pgsql-hackers

From Emmanuel Cecchet
Subject Re: Locks on temp table and PREPARE
Date
Msg-id 4A26E226.1000706@frogthinker.org
Whole thread Raw
In response to Re: Locks on temp table and PREPARE  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Locks on temp table and PREPARE
Re: Locks on temp table and PREPARE
List 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


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Plan time Improvement - 64bit bitmapset
Next
From: Tom Lane
Date:
Subject: Improving the ngettext() patch