On Wed, 4 Aug 1999, Bruce Momjian wrote:

> Please send a reproducable sample, with CREATE TABLE, INSERT, etc.

My table is rather large so here's one small sample. This one doesn't
crash, but it hangs on DELETE using up 100% CPU. This one is tested on
FreeBSD 3.2-STABLE.

CREATE TABLE Test (
  A INTEGER
);

INSERT INTO Test VALUES (1);
INSERT INTO Test VALUES (1);
INSERT INTO Test VALUES (2);
INSERT INTO Test VALUES (2);
INSERT INTO Test VALUES (3);
INSERT INTO Test VALUES (4);

-- Quit psql and start another session:

BEGIN;
SELECT A, COUNT(*)
  INTO TEMP T1
  FROM Test
  GROUB BY A;
DELETE
  FROM T1
  WHERE Count = 1;
-- It hangs on the last statement above

Using gdb to break into the backend (it was doing DELETE according to ps)
I got this backtrace:

#0  0x8109c00 in HeapTupleSatisfiesSnapshot ()
#1  0x8069af7 in heapgettup ()
#2  0x806a550 in heap_getnext ()
#3  0x8096759 in SeqNext ()
#4  0x8091e28 in ExecScan ()
#5  0x80967fb in ExecSeqScan ()
#6  0x8090836 in ExecProcNode ()
#7  0x808f931 in ExecutePlan ()
#8  0x808f2c5 in ExecutorRun ()
#9  0x80dd283 in ProcessQueryDesc ()
#10 0x80dd2e8 in ProcessQuery ()
#11 0x80dbdf2 in pg_exec_query_dest ()
#12 0x80dbccf in pg_exec_query ()
#13 0x80dcd14 in PostgresMain ()
#14 0x80c6db6 in DoBackend ()
#15 0x80c68ee in BackendStartup ()
#16 0x80c5fea in ServerLoop ()
#17 0x80c5b7b in PostmasterMain ()
#18 0x809e452 in main ()
#19 0x80607d1 in _start ()

Thanks,
Anto.

Reply via email to