[HACKERS] union all query consumes all memory

2013-11-14 Thread Pavel Stehule
Hello, one my customer reported a out of memory issue. After investigation he found a main problem in large query that uses a lot of union all queries. He wrote a self test: do $$ declare i integer; str text=''; begin for i in 1..1000 loop str := str || 'union all select i,i,i from

Re: [HACKERS] union all query consumes all memory

2013-11-14 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: one my customer reported a out of memory issue. After investigation he found a main problem in large query that uses a lot of union all queries. He wrote a self test: do $$ declare i integer; str text=''; begin for i in 1..1000 loop str