| От | Magnus Naeslund(f) |
|---|---|
| Тема | Vacuum from within a function crashes backend |
| Дата | |
| Msg-id | 14c001c266ff$ff953f60$f80c0a0a@mnd обсуждение исходный текст |
| Ответы |
Re: Vacuum from within a function crashes backend
|
| Список | pgsql-hackers |
Hello,
I did a vacuum from within a function, and it went sig11 on me.
Is it illegal to do that?
The function:
drop function xorder1_cleanup();
create function xorder1_cleanup() RETURNS integer AS '
declarex record;c integer;
begin c:=0; FOR x IN SELECT order_id,count(*) as cnt FROM xorder1_updates group by order_id LOOP if x.cnt > 1 then
c:=c+x.cnt; delete from xorder1_updates where order_id = x.order_id; insert into
xorder1_updates(order_id)values (x.order_id); end if; END LOOP; execute ''vacuum full analyse xorder1_updates;'';
returnc;
end;
' LANGUAGE 'plpgsql';
Magnus
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-Programmer/Networker [|] Magnus Naeslund
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера