From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Warren Volz <wrv(at)po(dot)cwru(dot)edu> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: Bug #514: Backend crashes periodically |
Date: | 2001-11-12 05:58:51 |
Message-ID: | 9536.1005544731@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Okay, I've extracted a reproducible test case from Warren's info:
Setup:
CREATE TABLE sis_user (
sis_user_id INTEGER PRIMARY KEY,
last_visit DATETIME NOT NULL DEFAULT TEXT 'now');
CREATE TABLE session (
session_key CHAR(40) PRIMARY KEY,
sis_user_id INTEGER NOT NULL REFERENCES sis_user(sis_user_id),
last_access_time DATETIME NOT NULL DEFAULT TEXT 'now');
CREATE RULE session_del AS ON DELETE TO session DO
UPDATE sis_user SET last_visit = OLD.last_access_time
WHERE OLD.sis_user_id = sis_user.sis_user_id;
insert into sis_user values(1);
In session 1, do:
insert into session values('zzz', 1);
begin;
delete from session where session_key = 'zzz';
In session 2, do:
delete from session where session_key = 'zzz';
Back to session 1:
end;
Session 2 crashes. Crash happens in current sources as well as 7.1.
The crash does NOT happen if the foreign key reference is removed from
session.sis_user_id. I'm not sure at this point whether the rule is
a crucial element or not. The problem appears to be generation of
an invalid plan tree: the Var being decoded has varno = OUTER, which
offhand I believe it should not have in an indexscan's qual tree.
I'm tired and am going to bed soon, but perhaps someone else would
like to poke at this before I get back to it...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-11-12 17:23:30 | Re: Bug #514: Backend crashes periodically |
Previous Message | Warren Volz | 2001-11-12 04:20:20 | Re: Bug #514: Backend crashes periodically |