Re: Consistent segfault in complex query

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: Consistent segfault in complex query
Дата
Msg-id 874leuptnv.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на Re: Consistent segfault in complex query  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Ответы Re: Consistent segfault in complex query  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Список pgsql-hackers
>>>>> "Andrew" == Andrew Gierth <andrew@tao11.riddles.org.uk> writes:

 Andrew> Bingo - I have a test case, which I'll post in a sec after
 Andrew> testing it on other versions.

OK, not only does it break in latest 9.3 stable, it also breaks in
current master.

This is the testcase:

create table mytable (id integer, foo text[] default '{}', flag boolean default false);
insert into mytable select generate_series(1,10);

now in session B do:
begin; update mytable set foo='{baz}', flag=true where id=6;
  -- leave transaction open

and in session A:
with tmp(f2) as (select array['foo'])
update mytable set foo = case when not flag then foo
                              when foo @> (select f2 from tmp) then foo
                              else foo || (select f2 from tmp) end
 where id=6;
  -- hangs on row lock

Then commit in session B, and watch A go down in flames.

Going to see if this can be narrowed down further.

-- 
Andrew (irc:RhodiumToad)


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

Предыдущее
От: Andrew Gierth
Дата:
Сообщение: Re: Consistent segfault in complex query
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: Consistent segfault in complex query