Re: create temp table ... inherits

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: create temp table ... inherits
Дата
Msg-id 3768.1065978385@sss.pgh.pa.us
обсуждение исходный текст
Ответ на create temp table ... inherits  (Robert Creager <Robert_Creager@LogicalChaos.org>)
Ответы Re: create temp table ... inherits  (Robert Creager <Robert_Creager@LogicalChaos.org>)
Re: create temp table ... inherits  (Robert Creager <Robert_Creager@LogicalChaos.org>)
Список pgsql-bugs
Robert Creager <Robert_Creager@LogicalChaos.org> writes:
> CREATE TEMP TABLE is being executed in two processes (same Perl/DBI script).  It occurs when the scripts are executed
atthe same time.  One of the processes dies with the following: 

> Oct 12 09:39:45 thunder postgres[31398]: [2-1] ERROR:  tuple concurrently updated
> Oct 12 09:39:45 thunder postgres[31398]: [2-2] STATEMENT:  CREATE TEMP TABLE temp_obs_v() INHERITS( obs_root ) ON
COMMITDELETE ROWS  

The two temp tables share a common parent?

My guess is that it's failing because setRelhassubclassInRelation just
does an unconditional simple_heap_update even when it doesn't need to.
We could fix that fairly easily, which would greatly reduce the odds
of the problem although not prevent it completely.  (I think complete
prevention would require locking the parent table, which cure seems
worse than the disease.)

Can you get a backtrace from the errfinish call to confirm this theory?

            regards, tom lane

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

Предыдущее
От: Robert Creager
Дата:
Сообщение: create temp table ... inherits
Следующее
От: Robert Creager
Дата:
Сообщение: Re: create temp table ... inherits