Re: Locks on temp table and PREPARE

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Locks on temp table and PREPARE
Дата
Msg-id 20090603210131.GT7172@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Locks on temp table and PREPARE  (Emmanuel Cecchet <manu@frogthinker.org>)
Список pgsql-hackers
Emmanuel Cecchet wrote:
> 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.

The classic example is having an open cursor that references the table.
(In this case it doesn't work, but the snapshot management module and
tqual.c don't know it.)  If you want this to work you need to improve
those modules, and who knows what else ...

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Locks on temp table and PREPARE
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Postgres delays function returning large set of data