Re: [BUGS] Postgresql 9.1.2 - abnormal memory usage

2011-12-22 Thread Andres Freund
Hi, On Friday, December 16, 2011 01:50:03 PM Havasvölgyi Ottó wrote: > A simple query "insert into mytable default values" on a single > serial-column table also leaks. It can also produced by pgbench. On > Windows and Linux too. Youve mentioned that in several threads now. If you really think th

Re: [BUGS] Postgresql 9.1.2 - abnormal memory usage

2011-12-16 Thread Havasvölgyi Ottó
Hi, A simple query "insert into mytable default values" on a single serial-column table also leaks. It can also produced by pgbench. On Windows and Linux too. Best regards, Otto 2011/12/12 Jochen Erwied > Monday, December 12, 2011, 12:33:03 PM you wrote: > > > On 12.12.2011 13:16, Matteo Bec

Re: [BUGS] Postgresql 9.1.2 - abnormal memory usage

2011-12-12 Thread Jochen Erwied
Monday, December 12, 2011, 12:33:03 PM you wrote: > On 12.12.2011 13:16, Matteo Beccati wrote: >> Just to clarify, am I correct assuming that the issue does not affect >> tables which have non-indexed inet fields? > Hmm, I think it might also affect queries that do large merge joins on > inet f

Re: [BUGS] Postgresql 9.1.2 - abnormal memory usage

2011-12-12 Thread Heikki Linnakangas
On 12.12.2011 13:16, Matteo Beccati wrote: On 12/12/2011 09:29, Heikki Linnakangas wrote: On 12.12.2011 08:26, Tom Lane wrote: Andres Freund writes: In 3b8161723c645853021b57330dd2ea0484ec6131 Heikki made DatumGetInetP unpack toasted values. Unfortunately the btree support functions for the

Re: [BUGS] Postgresql 9.1.2 - abnormal memory usage

2011-12-12 Thread Matteo Beccati
Hi Heikki, On 12/12/2011 09:29, Heikki Linnakangas wrote: > On 12.12.2011 08:26, Tom Lane wrote: >> Andres Freund writes: >>> In 3b8161723c645853021b57330dd2ea0484ec6131 Heikki made DatumGetInetP >>> unpack >>> toasted values. Unfortunately the btree support functions for the >>> inet type >>> di

Re: [BUGS] Postgresql 9.1.2 - abnormal memory usage

2011-12-12 Thread Heikki Linnakangas
On 12.12.2011 08:26, Tom Lane wrote: Andres Freund writes: In 3b8161723c645853021b57330dd2ea0484ec6131 Heikki made DatumGetInetP unpack toasted values. Unfortunately the btree support functions for the inet type didn't free memory which they have to do in contrast to about everything else. I

Re: [BUGS] Postgresql 9.1.2 - abnormal memory usage

2011-12-11 Thread Jochen Erwied
Monday, December 12, 2011, 1:45:42 AM you wrote: > Jochen, could you try the attached patch? Patch is missing a variable define for 'r' in network_sup(). Fixed patch attached. Memory usage for insert ~1087MB - no change Memory usage for index creation ~415MB - fixed. Memory usage for select ~15

Re: [BUGS] Postgresql 9.1.2 - abnormal memory usage

2011-12-11 Thread Tom Lane
Andres Freund writes: > In 3b8161723c645853021b57330dd2ea0484ec6131 Heikki made DatumGetInetP unpack > toasted values. Unfortunately the btree support functions for the inet type > didn't free memory which they have to do in contrast to about everything else. > I fixed a few more functions than

Re: [BUGS] Postgresql 9.1.2 - abnormal memory usage

2011-12-11 Thread Andres Freund
Hi, On Monday, December 12, 2011 12:45:23 AM Andres Freund wrote: > On Sunday, December 11, 2011 10:15:29 PM Jochen Erwied wrote: > > The following script can be used to show the behaviour: > > > > create database pgtest; > > \c pgtest > > create table test(var inet); > > insert into test(var) '1

Re: [BUGS] Postgresql 9.1.2 - abnormal memory usage

2011-12-11 Thread Andres Freund
Hi, On Sunday, December 11, 2011 10:15:29 PM Jochen Erwied wrote: > The following script can be used to show the behaviour: > > create database pgtest; > \c pgtest > create table test(var inet); > insert into test(var) '127.0.0.0'::inet+generate_series(0,256*256*256-1); > create index test_ix on

[BUGS] Postgresql 9.1.2 - abnormal memory usage

2011-12-11 Thread Jochen Erwied
After upgrading from 9.1.1 to 9.1.2, memory usage for some queries increased to the amount that the OOM-killer on Linux terminated the server. Further investigation show the problem to occur under multiple circumstances: - copying data from an external file into a table with indexes - creating in