exists with join key of type oid - Mailing list pgsql-sql

From Karin Probost
Subject exists with join key of type oid
Date
Msg-id 358650EE.B285DDF9@uni-wuppertal.de
Whole thread Raw
List pgsql-sql
I am testing the new features
exists/not exists with POSTGRES 6.2.3. on SGI O2 , IRIX6.3, Processor
R5000

It runs in a

FATAL 1:  palloc failure: memory exhausted

error , when the joined column are of type oid.
I also tried the same with join column of type text and int4
which worked fine.

Here my test-input-file for psql


******
-- Testsqls fuer exists in
--      postgres 6.3.2
--      pattform        SGI IRIX6.3
--      Processor       R5000
--      Compiler        cc from  SGI without options -- > defaults to cc
-32 -mips2
--
DROP TABLE tab_pers;
DROP TABLE tab_ang;

CREATE TABLE tab_pers (
        anrede text
        , name text
        , vorname text
        , tel_mat int4
        , org_einh int4
);
CREATE TABLE tab_ang (
        personen_oid oid
        , anrede_titel text
        , raum_nr text
        , kostenstelle int4
)
;
COPY tab_ang  FROM stdin;
19000   Dr      P-.-9.05        1234
\.
COPY tab_pers WITH OIDS FROM stdin;
19000   Herr    Probost Martin  2809    3
\.

select oid,* from tab_pers;
select * from tab_ang;

select * from tab_pers
where
        exists  (
                select * from tab_ang
                where tab_ang.personen_oid = tab_pers.oid
        )
;
DROP TABLE tab_pers;
DROP TABLE tab_ang;

---------------------------------------------------------------------------


Here the output of psql


-- Testsqls fuer exists in
--      postgres 6.3.2
--      pattform        SGI IRIX6.3
--      Processor       R5000
--      Compiler        cc from  SGI without options -- > defaults to cc
-32 -mips2
--

DROP TABLE tab_pers;
DROP TABLE tab_ang;

CREATE TABLE tab_pers (
        anrede text
        , name text
        , vorname text
        , tel_mat int4
        , org_einh int4
);
CREATE TABLE tab_ang (
        personen_oid oid
        , anrede_titel text
        , raum_nr text
        , kostenstelle int4
)
;
COPY tab_ang  FROM stdin;
COPY tab_pers WITH OIDS FROM stdin;

select oid,* from tab_pers;
DROP
DROP
CREATE
CREATE
  oid|anrede|name   |vorname|tel_mat|org_einh
-----+------+-------+-------+-------+--------
19000|Herr  |Probost|Martin |   2809|       3
(1 row)

select * from tab_ang;
personen_oid|anrede_titel|raum_nr |kostenstelle
------------+------------+--------+------------
       19000|Dr          |P-.-9.05|        1234
(1 row)


select * from tab_pers
where
        exists  (
                select * from tab_ang
                where tab_ang.personen_oid = tab_pers.oid
        )
;
FATAL 1:  palloc failure: memory exhausted

DROP TABLE tab_pers;
PQexec() -- Request was sent to backend, but backend closed the channel
before responding.
        This probably means the backend terminated abnormally before or
while processing the request.
DROP TABLE tab_ang;
PQexec() -- There is no connection to the backend.
EOF


---------------------------------------------------------------------------

The above goes along with a SYSLOG-error:

ALERT: postgres [16018] - out of logical swap space during brk/sbrk -
see swap(1M)
ALERT: syslogd [74] - out of logical swap space during fork while
allocating uarea - see swap(1M)


Thanking in advance for help.

--
MfG

-------------------------------------------------------------------------
- Karin Probost
- Bergische Universitaet Gesamthochschule Wuppertal
- RECHENZENTRUM  Raum P-.09.05
- Gaussstr. 20
- D-42097 Wuppertal
- Germany
-
- Tel. : +49 -202 /439 2809 ,Fax -2910
--Email: probost@uni-wuppertal.de
--Home : http://www.hrz.uni-wuppertal.de/hrz/personen/k_probost.html
-------------------------------------------------------------------------

pgsql-sql by date:

Previous
From: Herouth Maoz
Date:
Subject: Re: [SQL] cast text as date
Next
From: Marcio Macedo
Date:
Subject: handle the MONEY type