Re: [GENERAL] insertion with trigger failed unexpectedly
On Monday 12 January 2004 05:57, [EMAIL PROTECTED] wrote: Dear all, i have a problem with insertion data and running post insert trigger on it. When i'm doing tests - everything is going well, but in production when multiple records being inserted losses happend. OK - there must be something different happening with the live situation. Better post the CREATE TABLE, trigger code and a sample INSERT. PS - is the problem: 1. INSERT fails to raw table, and daily is not updated 2. INSERT fails to raw table, but daily is updated 3. INSERT works on raw table but daily is not updated -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
Re: [GENERAL] insertion with trigger failed unexpectedly
Dear Anton Nikiforov, The problem: From the very beginning everything was fine and all records that i was getting from routers were calculated just right. I spent a weeks monitoring and testing my software. Now i have 10.000.000 records in raw table and when i'm inserting data alot of records are missing in raw and daily. Sometimes i got UPDATE failed errors, sometimes INSERT failed, but in general i'm getting this messages twice a day but not only two records are missing - hundreds of them. I am suggesting something but may be its wrong in eithercase we would require your PostgreSQL version number etc Also Checkout the disk space if you have run out of diskspace Currently i have no idea where to go and what to check. I did my tests mainly on FreeBSD platform and now i did tests on RedHat Linux and the result is the same - some records just did not This is a real problem its seems no disk space probelm in this case would you please show us the code reach the database (trigger has logger that is saying that everything Regards, Vishal Kashyap ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [GENERAL] insertion with trigger failed unexpectedly
Richard Huxton [EMAIL PROTECTED] writes: On Monday 12 January 2004 05:57, [EMAIL PROTECTED] wrote: i have a problem with insertion data and running post insert trigger on it. Better post the CREATE TABLE, trigger code and a sample INSERT. And the specific error messages you're getting, and the PG version number. Also, you say it happens twice a day --- do you mean at specific times of day, like noon and midnight? regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
[GENERAL] insertion with trigger failed unexpectedly
Dear all, i have a problem with insertion data and running post insert trigger on it. Preambula: there is a table named raw: ipsrc | cidr ipdst | cidr bytes | bigint time | timestamp Triggers: daily_trigger AFTER INSERT OR UPDATE ON raw FOR EACH ROW EXECUTE PROCEDURE daily_func() and the table daily: ip| cidr bytesin | bigint bytesout | bigint local_traffic | boolean time | date The matter of this code is to store raw traffic counters that i'm getting from my cisco or FreeBSD routers and calculate daily traffic in daily table dividing it into internal and external by internal ip. The problem: From the very beginning everything was fine and all records that i was getting from routers were calculated just right. I spent a weeks monitoring and testing my software. Now i have 10.000.000 records in raw table and when i'm inserting data alot of records are missing in raw and daily. Sometimes i got UPDATE failed errors, sometimes INSERT failed, but in general i'm getting this messages twice a day but not only two records are missing - hundreds of them. Currently i have no idea where to go and what to check. I did my tests mainly on FreeBSD platform and now i did tests on RedHat Linux and the result is the same - some records just did not reach the database (trigger has logger that is saying that everything was inserted, but it is not true, the tool that inerting records has logger too). When i'm doing tests - everything is going well, but in production when multiple records being inserted losses happend. The insertion tool is very simple C program that (looks like) have no place to store bugs :) The trigger is very simple too. If you need the code - i could post it here, but i do not think that it will be useful. Could you give me an idea where to go and what to check in this case? Regards, Anton ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster