Re: insertion with trigger failed unexpectedly

From: Anton(dot)Nikiforov(at)loteco(dot)ru
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: insertion with trigger failed unexpectedly
Date: 2004-01-13 11:48:07
Message-ID: 8218014032.20040113144807@loteco.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

RH> So - the error is that occasionally, some values aren't entered in the raw
RH> table nor summarised in the daily table?
Yes. Exactly. After reacing the number of records in the row above
8.000.000 (before i did not have a problems and in my tests 2million
records everything was just fine)

RH> Does your live insertion code check the result-code from PG? If the insert is
RH> failing, it should say so.
It is saying. That couple UPDATE/Insert failures are coming from
insertion tool diagnostics.

RH> I'd suspect some concurrency issues, but I can't see anything obvious. Testing
RH> for this is a pain, but it produces exactly these kind of problems. Try
RH> running 5 test processes at once, all inserting simultaneously and see if
RH> that reproduces your problem.
The matter is that there is no cuncurrency in real life. Insertion
tool trying to insert next value after getting return code from PG
that the previous one is done. Statistics being downloaded from the
routers each 5 minutes and the procedure to upload it into PG takes no
more than 2 minutes, so cuncurrency is impossible.
I do not know exactly, but maybe PG returning from insert before
trigger is done?
I was also testing inserts without a trigger. With my insertion tool
everything was fine, but with inserting from text file via psql
utility there were looses if the number of INSERTs was largger than
100 items.
For information the same happened on my 7.3.2, then 7.3.4 and now 7.4.

Best regards,
Anton

RH> If no-one else has a bright idea, I'll try running it with some test data on
RH> my end this afternoon (London time) if I get a chance.

Ñ óâàæåíèåì,
IT Äèðåêòîð ÎÎÎ "Ëîòýêî"
Àíòîí Íèêèôîðîâ
Òåë.: +7 095 7814200
Ôàêñ: +7 095 7814201
Mail: Anton(dot)Nikiforov(at)loteco(dot)ru
Web: www.loteco.ru

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2004-01-13 11:48:18 Re: Reallife szenario for GEQO
Previous Message Richard Huxton 2004-01-13 11:42:44 Re: Parse error help needed...