Re: Transactions and temp tables

Поиск
Список
Период
Сортировка
От Emmanuel Cecchet
Тема Re: Transactions and temp tables
Дата
Msg-id 49344E22.2000008@frogthinker.org
обсуждение исходный текст
Ответ на Re: Transactions and temp tables  (Emmanuel Cecchet <manu@frogthinker.org>)
Ответы Re: Transactions and temp tables  (Emmanuel Cecchet <manu@frogthinker.org>)
Re: Transactions and temp tables  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
Heikki,

I think that the Assert in is_temp_rel(Oid) in tablecmds.c should be 
replaced by if (on_commits == NULL) return false;
As the use case below shows, a regular table can be created and hold a 
LOCKTAG_RELATION lock that will trigger the call to is_temp_rel in 
is_preparable_locktag. The assert will break if no temp table was accessed.

As we were also trying to list potential issues, if the temp table uses 
a SERIAL type, will there be potentially a problem with the sequence at 
prepare time?

Emmanuel


> The following test fails with your patch on my system. Could you check 
> if you can reproduce?
>
> psql (8.4devel)
> Type "help" for help.
>
> test=# begin;
> BEGIN
> test=# create table paul(x int);
> CREATE TABLE
> test=# insert into paul values(1);
> INSERT 0 1
> test=# prepare transaction 'persistentTableShouldSucceed';
> server closed the connection unexpectedly
>        This probably means the server terminated abnormally
>        before or while processing the request.
> The connection to the server was lost. Attempting reset: Failed.
>
> ---
>
> LOG:  database system is ready to accept connections
> TRAP: FailedAssertion("!(on_commits != ((void *)0))", File: 
> "tablecmds.c", Line: 7823)
> LOG:  server process (PID 15969) was terminated by signal 6: Aborted
> LOG:  terminating any other active server processes
> FATAL:  the database system is in recovery mode
>
>
> Thanks,
> manu
>


-- 
Emmanuel Cecchet
FTO @ Frog Thinker 
Open Source Development & Consulting
--
Web: http://www.frogthinker.org
email: manu@frogthinker.org
Skype: emmanuel_cecchet



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

Предыдущее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: Statement-level triggers and inheritance
Следующее
От: "Robert Haas"
Дата:
Сообщение: Re: patch: Add columns via CREATE OR REPLACE VIEW