Re: [PERFORM] Excessive memory used for INSERT

2015-01-06 Thread Alessandro Ipe
Hi, Doing the UPDATE on the child table (provided that the table does exist) as you recommended solved all my memory consumption issue. Thanks a lot, Alessandro. On Tuesday 23 December 2014 15:27:41 Tom Lane wrote: > Alessandro Ipe writes: > > I guess the memory consumption is

Re: [PERFORM] Excessive memory used for INSERT

2014-12-23 Thread Alessandro Ipe
les&t=5e0e9e1bb06dce1d12c95662a9ee1c03 The queries causing the issue are given in files - tmp.OqOavPYbHa (with the new upsert_func function) - tmp.f60wlgEDWB (with WITH .. AS statement) I hope it will help. Thanks. Regards, A. On Thursday 18 December 2014 12:05:45 Tom Lane wrote: > Alessandro Ipe writes: > &g

Re: [PERFORM] Excessive memory used for INSERT

2014-12-18 Thread Alessandro Ipe
Hi, I can send a full dump of my database (< 2MB) if it is OK for you. Thanks, A. On Thursday 18 December 2014 12:05:45 Tom Lane wrote: > Alessandro Ipe writes: > > Hi, > > I tried also with an upsert function > > CREATE FUNCTION upsert_func(sql_insert text, sql_up

Re: [PERFORM] Excessive memory used for INSERT

2014-12-18 Thread Alessandro Ipe
; RETURN; END; $$; with the same result on the memory used... The tables hold 355000 rows in total. Regards, A. On Thursday 18 December 2014 12:16:49 Alessandro Ipe wrote: > Hi, > > > A grep in a nightly dump of this database did not return any AFTER trigger. > Th

Re: [PERFORM] Excessive memory used for INSERT

2014-12-18 Thread Alessandro Ipe
On Thursday 18 December 2014 08:51:47 Torsten Förtsch wrote: > On 17/12/14 16:14, Alessandro Ipe wrote: > > 2014-12-15 17:54:07 GMT LOG: server process (PID 21897) was terminated > > by signal 9: Killed > > since it was killed by SIGKILL, maybe it's the kernel'

Re: [PERFORM] Excessive memory used for INSERT

2014-12-18 Thread Alessandro Ipe
A. On Wednesday 17 December 2014 12:49:03 Tom Lane wrote: > Alessandro Ipe writes: > > My dtrigger definition is > > CREATE TRIGGER msg_trigger BEFORE INSERT ON msg FOR EACH ROW EXECUTE > > PROCEDURE msg_function(); so it seems that it is a BEFORE trigger. > > Hm, n

Re: [PERFORM] Excessive memory used for INSERT

2014-12-17 Thread Alessandro Ipe
Hi, My dtrigger definition is CREATE TRIGGER msg_trigger BEFORE INSERT ON msg FOR EACH ROW EXECUTE PROCEDURE msg_function(); so it seems that it is a BEFORE trigger. To be totally honest, I have "really" limited knownledge in SQL and postgresql and all these were gathered from recipes found on

Re: [PERFORM] Excessive memory used for INSERT

2014-12-17 Thread Alessandro Ipe
Hi Torsten, Thanks for your answer. I have modified (SELECT * FROM upsert) to (SELECT * FROM upsert WHERE slot=to_timestamp('201212032145', 'MMDDHH24MI') and MSG=2) according to your suggestion to reduce the result-set to a single row. However, the INSERT process is still consuming the sam

[PERFORM] Excessive memory used for INSERT

2014-12-17 Thread Alessandro Ipe
Hi, Software and hardware running postgresql are: - postgresql92-9.2.3-1.1.1.x86_64 - openSuSE 12.3 x64_86 - 16 GB of RAM - 2 GB of swap - 8-core Intel(R) Xeon(R) CPU E5-2407 0 @ 2.20GHz - ext4 filesystem hold on a hardware Dell PERC H710 RAID10 with 4x4TB SATA HDs. - 2 GB of RAM are reserved for