Re: Excessive memory used for INSERT

Поиск
Список
Период
Сортировка
От Alessandro Ipe
Тема Re: Excessive memory used for INSERT
Дата
Msg-id 6053205.R7VxckQEVY@snow.oma.be
обсуждение исходный текст
Ответ на Re: Excessive memory used for INSERT  (Alessandro Ipe <Alessandro.Ipe@meteo.be>)
Ответы Re: Excessive memory used for INSERT
Список pgsql-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

 

В списке pgsql-performance по дате отправления:

Предыдущее
От: Alessandro Ipe
Дата:
Сообщение: Re: Excessive memory used for INSERT
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Excessive memory used for INSERT