Re: Drop or alter column under load give ERROR #42804 structure of query does not match function result type:

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Drop or alter column under load give ERROR #42804 structure of query does not match function result type:
Дата
Msg-id 20151012134852.GB30738@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Drop or alter column under load give ERROR #42804 structure of query does not match function result type:  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
On 2015-10-12 06:42:52 -0700, Adrian Klaver wrote:
> >My guess is that the problem here is that table level locking prevents
> >modification of the "users" type when the table is used, but there's no
> >locking preventing the columns to be dropped while the function is
> >used. So what happens is that 1) the function is parsed & planned 2)
> >DROP COLUMN is executed 3) the contained statement is executed 4) a
> >mismatch between the contained statement and the function definition is
> >detected.
>
> Except per Albe's[1] example, the above sequence of events does not fail. It
> fails in Victors's case when the server is under load, so it seems there is
> another factor in play.

The above sequence is only problematic if 2) happens exactly between 1)
and 3), which is not particularly likely given that 1) is a very quick
operation.

Greetings,

Andres Freund


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Drop or alter column under load give ERROR #42804 structure of query does not match function result type:
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Drop or alter column under load give ERROR #42804 structure of query does not match function result type: