Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Hackers > Bug 3883 revisi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 9334 of 9685
Post > Topic >>

Bug 3883 revisited

by heikki@[EMAIL PROTECTED] ("Heikki Linnakangas") May 9, 2008 at 05:41 PM

The "TRUNCATE table while we're holding references to it" bug (3883), is 
causing an assertion failure on 8.2, when the TRUNCATE is called in a 
trigger:

Script:

CREATE TABLE proc(n int);
INSERT INTO proc VALUES (9);

CREATE OR REPLACE FUNCTION deltrig() RETURNS trigger LANGUAGE plpgsql AS
$$
BEGIN
   EXECUTE 'TRUNCATE TABLE proc';
   RETURN OLD;
end;
$$;

CREATE TRIGGER trg_proc BEFORE DELETE ON PROC FOR EACH ROW EXECUTE 
PROCEDURE deltrig();

DELETE FROM proc WHERE n=9;


Error message:

TRAP: FailedAssertion("!(( ((void) ((bool) ((! assert_enabled) || ! 
(!(((void*)(lp) != ((void *)0)))) || 
(ExceptionalCondition("!(((void*)(lp) != ((void *)0)))", 
("FailedAssertion"), "heapam.c", 1595))))), (bool) (((lp)->lp_flags & 
0x01) != 0) ))", File: "heapam.c", Line: 1595)

With assertions disabled, you get an "attempted to delete invisible 
tuple" error, but it seems like good luck that it doesn't lead to a crash.

I think we need to backpatch the fix for this...

-- 
   Heikki Lin****angas
   EnterpriseDB   http://www.enterprisedb.com

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
 




 3 Posts in Topic:
Bug 3883 revisited
heikki@[EMAIL PROTECTED]   2008-05-09 17:41:58 
Re: Bug 3883 revisited
alvherre@[EMAIL PROTECTED  2008-05-15 15:15:17 
Re: Bug 3883 revisited
tgl@[EMAIL PROTECTED] (T  2008-05-27 12:46:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Tue Jul 8 23:55:30 CDT 2008.