From: | "Vilson farias" <vilson(dot)farias(at)digitro(dot)com(dot)br> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Cc: | "SIMONE Carla MOSENA" <simone(dot)mosena(at)digitro(dot)com(dot)br> |
Subject: | vacuumdb locked - part II |
Date: | 2001-03-19 20:01:03 |
Message-ID: | 003a01c0b0af$539f7b60$98a0a8c0@dti.digitro.com.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I found another detail :
All access to oper_juntor table is blocked, like it's always locked.
bxs=# select * from oper_juntor;
<<here I need to send a Ctrl + C or I'll wait forever>>
Cancel request sent
ERROR: Query cancel requested while waiting lock
bxs=#
The only non-usual aspect of this table is the atualization throught a
pl/pgsql function. Is it possible to a function make a non-authorized lock
in a table or something like that?
This problem was happening in Postgres 7.0.2. I've changed to 7.0.3 and it's
still happening.
CREATE FUNCTION insere_topologia(int4, int4, int4, int4, int4) RETURNS int4
AS
'
DECLARE
pbxs ALIAS FOR $1;
peg ALIAS FOR $2;
plink ALIAS FOR $3;
pijuntor ALIAS FOR $4;
pfjuntor ALIAS FOR $5;
I int4;
nrows record;
BEGIN
I := pijuntor;
WHILE I <= pfjuntor LOOP
SELECT *
INTO nrows
FROM oper_juntor
WHERE cod_bxs = pbxs AND
cod_juntor = I;
IF FOUND THEN
UPDATE oper_juntor
SET cod_eg = peg,
cod_link = plink
WHERE cod_bxs = pbxs AND
cod_juntor = I;
ELSE
INSERT INTO oper_juntor (cod_bxs, cod_eg, cod_link, cod_juntor)
VALUES (pbxs, peg, plink, I);
END IF;
I := I + 1;
END LOOP;
RETURN 0;
END;
'
LANGUAGE 'plpgsql';
Greetings,
José Vilson de Mello de Farias.
Dígitro Tecnologia Ltda. - Brazil
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Wickstrom | 2001-03-19 20:07:20 | Re: select fails inside function, but works otherwise |
Previous Message | Lamar Owen | 2001-03-19 19:56:31 | Re: Cant connect if -B 1024 was set to postmaster |