clemens oertel ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.
Short Description
alloc error on multiple action-queries within a rule
Long Description
when executing the rule 'tax_genuses_del' (see sample code) postgresql reports 'ERROR:
Memory exhausted in AllocSetAlloc(20)'. each of the the two action-queries runs
perfectly by itself, as does the rule with only one of them. neither action (update
and insert) takes place.
please do not hesitate to contact me if any further information is needed.
PostgreSQL Version: 7.1.2
PostgreSQL startup: /usr/local/bin/postmaster -D /home/pgsql -i (postgres)
OS: FreeBSD 4.2 release i386, AMD Duron, 256MB
Log-File:
TopMemoryContext: 40984 total in 5 blocks; 21896 free (29 chunks); 19088 used
TopTransactionContext: 8192 total in 1 blocks; 8176 free (0 chunks); 16 used
DeferredTriggerXact: 8192 total in 1 blocks; 8104 free (0 chunks); 88 used
TransactionCommandContext: 266330112 total in 42 blocks; 544 free (1 chunks);
266329568 used
QueryContext: 57344 total in 3 blocks; 11768 free (0 chunks); 45576 used
DeferredTriggerSession: 8192 total in 1 blocks; 8176 free (0 chunks); 16 used
CacheMemoryContext: 516096 total in 6 blocks; 122976 free (66 chunks); 393120 used
tax_genuses: 72704 total in 71 blocks; 1392 free (0 chunks); 71312 used
pg_rules: 5120 total in 5 blocks; 120 free (0 chunks); 5000 used
pg_user: 5120 total in 5 blocks; 912 free (0 chunks); 4208 used
PortalMemory: 8192 total in 1 blocks; 8176 free (0 chunks); 16 used
MdSmgr: 8192 total in 1 blocks; 6120 free (0 chunks); 2072 used
DynaHash: 57344 total in 3 blocks; 30688 free (5 chunks); 26656 used
ErrorContext: 8192 total in 1 blocks; 8176 free (0 chunks); 16 used
ERROR: Memory exhausted in AllocSetAlloc(20)
Sample Code
CREATE TABLE _tax_genuses (
ins_onTIMESTAMP,
ins_byVARCHAR(8),
upd_onTIMESTAMP,
upd_byVARCHAR(8),
upd_count INT2,
deleted BOOL,
idSERIAL,
tfamily INT4NOT NULL,
name TEXTNOT NULL,
authorTEXT,
CONSTRAINT tgenus_id PRIMARY KEY (id),
);
CREATE TABLE hist_tax_genuses AS SELECT * FROM _tax_genuses;
CREATE VIEW tax_genuses AS
SELECT g.ins_on, g.ins_by, g.upd_on, g.upd_by, g.upd_count, g.id, g.tfamily, g.name,
g.author
FROM _tax_genuses g
JOIN _tax_families f ON g.tfamily=f.id AND f.deleted=false
JOIN _tax_orders o ON f.torder=o.id AND o.deleted=false
JOIN _tax_classes c ON o.tclass=c.id AND c.deleted=false
JOIN _tax_realms r ON c.trealm=r.id AND r.deleted=false
WHERE g.deleted=false;
CREATE RULE tax_genuses_del AS
ON DELETE TO tax_genuses DO INSTEAD
(UPDATE _tax_genuses
SET upd_on=now(), upd_by=current_user, upd_count=OLD.upd_count + 1, deleted=true
WHERE id=OLD.id;
INSERT INTO hist_tax_genuses SELECT * FROM _tax_genuses WHERE id=OLD.id);
INSERT INTO tax_genuses VALUES (NULL, NULL, NULL, NULL, NULL, NULL, 1, 'Ustlago',
'Oertel');
INSERT INTO tax_genuses VALUES (NULL, NULL, NULL, NULL, NULL, NULL, 1, 'Farysia',
'Oertel');
INSERT INTO tax_genuses VALUES (NULL, NULL, NULL, NULL, NULL, NULL, 1, 'Websdanea',
'Oertel');
INSERT INTO tax_genuses VALUES (NULL, NULL, NULL, NULL, NULL, NULL, 1, 'Cintractia',
'Oertel');
DELETE FROM tax_aliases WHERE id=4;
-- BOOM
No file was uploaded with this report
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])