From: Alessandro Ipe <Alessandro.Ipe@meteo.be>
To: pgsql-performance@postgresql.org
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Torsten Zuehlsdorff <mailinglists@toco-domains.de>
Subject: Re: Excessive memory used for INSERT
Date: Thu, 18 Dec 2014 17:31:46 +0100
Message-ID: <6053205.R7VxckQEVY@snow.oma.be> (raw)
In-Reply-To: <6645627.5dTte5MPLk@snow.oma.be>
References: <2163931.4eVnXNjHa3@snow.oma.be>
<4171.1418838543@sss.pgh.pa.us>
<6645627.5dTte5MPLk@snow.oma.be>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
Hi,
I tried also with an upsert function
CREATE FUNCTION upsert_func(sql_insert text, sql_update text) RETURNS void
LANGUAGE plpgsql
AS $$
BEGIN
EXECUTE sql_update;
IF FOUND THEN
RETURN;
END IF;
BEGIN
EXECUTE sql_insert;
EXCEPTION WHEN OTHERS THEN
EXECUTE sql_update;
END;
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.
> The only keys are primary on each daily table, through
> ADD CONSTRAINT "MSG_YYYY-MM-DD_pkey" PRIMARY KEY (slot, msg);
> and on the global table
> ADD CONSTRAINT msg_pkey PRIMARY KEY (slot, msg);
>
>
> Regards,
>
>
> A.
>
> On Wednesday 17 December 2014 12:49:03 Tom Lane wrote:
> > Alessandro Ipe <Alessandro.Ipe@meteo.be> 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, no AFTER triggers anywhere? Are there foreign keys, perhaps?
> >
> > regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: Alessandro.Ipe@meteo.be, tgl@sss.pgh.pa.us, mailinglists@toco-domains.de
Subject: Re: Excessive memory used for INSERT
In-Reply-To: <6053205.R7VxckQEVY@snow.oma.be>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox