Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 7D7759FB53D for ; Tue, 10 Jul 2007 17:53:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 47720-03 for ; Tue, 10 Jul 2007 17:53:44 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from BRUBLUmx12.mactelecom.net (BRUBLUmx12.mactelecom.net [217.64.240.4]) by postgresql.org (Postfix) with ESMTP id A327A9FB524 for ; Tue, 10 Jul 2007 17:53:46 -0300 (ADT) Received: from smtp.eurofer.be (217.64.254.218.mactelecom.net [217.64.254.218]) by BRUBLUmx12.mactelecom.net (Postfix) with ESMTP id 9E93D838055 for ; Tue, 10 Jul 2007 22:53:44 +0200 (CEST) Received: from ip-80-236-216-78.dsl.scarlet.be ([80.236.216.78] helo=[192.168.1.102]) by smtp.eurofer.be with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1I8Mi7-0005ft-7N for pgsql-admin@postgresql.org; Tue, 10 Jul 2007 22:53:44 +0200 Message-ID: <4693F1C0.7010502@eurofer.be> Date: Tue, 10 Jul 2007 22:53:20 +0200 From: De Leeuw Guy User-Agent: IceDove 1.5.0.10 (X11/20070329) MIME-Version: 1.0 To: pgsql-admin@postgresql.org X-Enigmail-Version: 0.94.2.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam_score: -4.2 X-SA-Exim-Connect-IP: 80.236.216.78 X-SA-Exim-Mail-From: G.De_Leeuw@eurofer.be Subject: delayed actions X-SA-Exim-Scanned: Yes (on smtp.eurofer.be) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/91 X-Sequence-Number: 26072 Hello all I write a new trigger in C. These trigger update a sums of rows and I have a strange problem : when I insert the data ok When I delete the data the DELETE are delayed and my trigger is fired a lot of time (see below) It is possible to flush the actions before exiting my trigger ? Thanks in advance Guy SPI_connect(); if bBusy return; /* global variable */ elog(INFO, "Not busy"); gd_SetBusy(relationName, true); gd_InitCatCodes(relationName, tupdesc, retTuple, valDiff, qteDiff, firedEvent); /* INSERT, DELETE, OR UPGRADE a lot of records */ gd_SetBusy(relationName, false); } SPI_finish(); } db_stats=# INSERT INTO table_f001 VALUES (1, 00000001, 2, 0010101, 3, 00000101, 4, 00004001, 5, 20070199, 0, 50); INFO: Not busy INFO: INSERT INTO table_f001 VALUES (1, 1, 2, 10101, 3, 101, 4, 4001, 5, 20079999, 0.000000, 50.000000); INFO: INSERT INTO table_f001 VALUES (1, 1, 2, 10101, 3, 101, 4, 4099, 5, 20070199, 0.000000, 50.000000); INFO: INSERT INTO table_f001 VALUES (1, 1, 2, 10101, 3, 101, 4, 4099, 5, 20079999, 0.000000, 50.000000); INFO: INSERT INTO table_f001 VALUES (1, 1, 2, 10101, 3, 1010, 4, 4001, 5, 20070199, 0.000000, 50.000000); INFO: INSERT INTO table_f001 VALUES (1, 1, 2, 10101, 3, 1010, 4, 4001, 5, 20079999, 0.000000, 50.000000); INFO: INSERT INTO table_f001 VALUES (1, 1, 2, 10101, 3, 1010, 4, 4099, 5, 20070199, 0.000000, 50.000000); INFO: INSERT INTO table_f001 VALUES (1, 1, 2, 10101, 3, 1010, 4, 4099, 5, 20079999, 0.000000, 50.000000); INFO: INSERT INTO table_f001 VALUES (1, 3, 2, 10101, 3, 101, 4, 4001, 5, 20070199, 0.000000, 50.000000); INFO: INSERT INTO table_f001 VALUES (1, 3, 2, 10101, 3, 101, 4, 4001, 5, 20079999, 0.000000, 50.000000); INFO: INSERT INTO table_f001 VALUES (1, 3, 2, 10101, 3, 101, 4, 4099, 5, 20070199, 0.000000, 50.000000); INFO: INSERT INTO table_f001 VALUES (1, 3, 2, 10101, 3, 101, 4, 4099, 5, 20079999, 0.000000, 50.000000); INFO: INSERT INTO table_f001 VALUES (1, 3, 2, 10101, 3, 1010, 4, 4001, 5, 20070199, 0.000000, 50.000000); INFO: INSERT INTO table_f001 VALUES (1, 3, 2, 10101, 3, 1010, 4, 4001, 5, 20079999, 0.000000, 50.000000); INFO: INSERT INTO table_f001 VALUES (1, 3, 2, 10101, 3, 1010, 4, 4099, 5, 20070199, 0.000000, 50.000000); INFO: INSERT INTO table_f001 VALUES (1, 3, 2, 10101, 3, 1010, 4, 4099, 5, 20079999, 0.000000, 50.000000); db_stats=# DELETE FROM table_f001; INFO: Not busy INFO: DELETE FROM table_f001 WHERE code01=1 AND code02=10101 AND code03=101 AND code04=4001 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=1 AND code02=10101 AND code03=101 AND code04=4099 AND code05=20070199; INFO: DELETE FROM table_f001 WHERE code01=1 AND code02=10101 AND code03=101 AND code04=4099 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=1 AND code02=10101 AND code03=1010 AND code04=4001 AND code05=20070199; INFO: DELETE FROM table_f001 WHERE code01=1 AND code02=10101 AND code03=1010 AND code04=4001 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=1 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20070199; INFO: DELETE FROM table_f001 WHERE code01=1 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=101 AND code04=4001 AND code05=20070199; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=101 AND code04=4001 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=101 AND code04=4099 AND code05=20070199; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=101 AND code04=4099 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4001 AND code05=20070199; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4001 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20070199; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: Not busy INFO: DELETE FROM table_f001 WHERE code01=1 AND code02=10101 AND code03=101 AND code04=4099 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=1 AND code02=10101 AND code03=1010 AND code04=4001 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=1 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=101 AND code04=4001 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=101 AND code04=4099 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4001 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: Not busy INFO: DELETE FROM table_f001 WHERE code01=1 AND code02=10101 AND code03=101 AND code04=4099 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=1 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20070199; INFO: DELETE FROM table_f001 WHERE code01=1 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=101 AND code04=4099 AND code05=20070199; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=101 AND code04=4099 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20070199; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: Not busy INFO: DELETE FROM table_f001 WHERE code01=1 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=101 AND code04=4099 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: Not busy INFO: DELETE FROM table_f001 WHERE code01=1 AND code02=10101 AND code03=1010 AND code04=4001 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=1 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20070199; INFO: DELETE FROM table_f001 WHERE code01=1 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4001 AND code05=20070199; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4001 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20070199; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: Not busy INFO: DELETE FROM table_f001 WHERE code01=1 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4001 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: Not busy INFO: DELETE FROM table_f001 WHERE code01=1 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20070199; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: Not busy INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: Not busy INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=101 AND code04=4001 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=101 AND code04=4099 AND code05=20070199; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=101 AND code04=4099 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4001 AND code05=20070199; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4001 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20070199; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: Not busy INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=101 AND code04=4099 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4001 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: Not busy INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=101 AND code04=4099 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20070199; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: Not busy INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: Not busy INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4001 AND code05=20079999; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20070199; INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: Not busy INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: Not busy INFO: DELETE FROM table_f001 WHERE code01=3 AND code02=10101 AND code03=1010 AND code04=4099 AND code05=20079999; INFO: Not busy db_stats=#