Check constraint memory problem - Mailing list pgsql-general

From Ricardo J.C.Coelho
Subject Check constraint memory problem
Date
Msg-id 01BE53A3.8B4E6D20.pulsar@truenet-ce.com.br
Whole thread Raw
List pgsql-general
Dear Thomas,

I began with ver.6.4 beta. What do I have to do ? Come back to 6.3 ?

However, I tested more and the problem appear when you use "check" clause of "create table".
Could you reproduce the situation with your PostGres 6.3 ? See the procedures below.

create table TBL (FLD1 int4, FLD2 char check (FLD2 in ('A','B')));
\copy TBL from tbl.txt         (a file with any number and the letter A);
update TBL set FLD2='B';

Result of copy and update command using a tbl.txt file with 100.000 rows in RedHat 5.2 and PgSQL 6.4.2
Max memory used during execution: incredible 77 Meg.
Without check clause postmaster uses just 2.6 Meg.

I think there is anything wrong.

Does anybody get the same result ?

Thanks,
Ricardo Coelho.

----- Mensagem original -----
De:        Thomas Reinke [SMTP:reinke@e-softinc.com]
Enviada em:        Sexta-feira, 5 de Fevereiro de 1999 11:29
Para:        Ricardo J.C.Coelho; pgsql-general@postgreSQL.org
Assunto:        Re: [GENERAL] Postmaster memory problem

I regularly do this with tables in access of 1.5 million rows.
E.g. update table set field1='',field2='',field3=''. I have
never run into memory problems. Mind you, I'm using RedHat 4
still, with PostGres 6.3, 128Meg Ram, 90 Meg swap.

"Ricardo J.C.Coelho" wrote:
>
> Hi,
>
> Does anybody use a single query affecting many rows (100,000 or more) ?
>
> I have a table with 500,000 rows. If I update all rows with one query (For
> example: update table set field='A';), postmaster will allocate the memory
> of the computer (including swap area), until "palloc memory exhauted". The
> same thing happens with COPY command. To load this table I splited the text
> file in many smaller files.
>
> What did I do wrong during Pgsql compilation ? I'm using RedHat 5.2 (Intel)
> and Pgsql 6.4.2
>
> Is there a way to limit the amount of memory used by postmaster ? I tried
> ulimit (unix command) and postmaster option but it aborted.
>
> Thanks,
>
> Ricardo Coelho.

--
------------------------------------------------------------
Thomas Reinke                            Tel: (416) 460-7021
Director of Technology                   Fax: (416) 598-2319
E-Soft Inc.                         http://www.e-softinc.com

pgsql-general by date:

Previous
From: "Ricardo J.C.Coelho"
Date:
Subject: A mistake generates strange result
Next
From: Joel Parker Henderson
Date:
Subject: How do I unsubscribe?