delayed actions

From: De Leeuw Guy <G(dot)De_Leeuw(at)eurofer(dot)be>
To: pgsql-admin(at)postgresql(dot)org
Subject: delayed actions
Date: 2007-07-10 20:53:20
Message-ID: 4693F1C0.7010502@eurofer.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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=#

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Alvaro Herrera 2007-07-10 21:00:10 Re: 8.2.4 patches?
Previous Message Richard Broersma Jr 2007-07-10 20:43:31 Re: 8.2.4 patches?