multiple insert

From: van Elsacker Frans <fve(at)atbib(dot)be>
To: pgsql-sql(at)postgresql(dot)org
Subject: multiple insert
Date: 2004-09-29 17:12:47
Message-ID: 415AED0F.1010909@atbib.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

We developed a program to follow up the time one is working on a
particular job. They start and stop the time counter different times a
day, now for already tree years. Everything works fine but for a short
while (august?) there are very few actions from which the beginning
time is inserted twice, even three times, without special reason. Now
this occurs a mean of once/two days. We disabled the possibility of
double clicking on the insert button to avoid double inserting but it
did not help. The table has appr 40.000 records now.
Employes have same working times and lunch times.( more ticks can have
same second for start)
vacuum runed.
Can the problem be caused by a heavy loaded server??

The structure of the table is :
CREATE TABLE tikbezig (
ordernr character(6) NOT NULL,
lijnnr character(2),
afdeling character(2),
werknr character(5),
begintijd timestamp with time zone, --startime
eindtijd timestamp with time zone, --endtime
begincomp character varying(20), -- computername
startjob
eindcomp character varying(20), --computername endjob
oo integer,
time zone
);

ordernr is not unique but has a index

CREATE INDEX tikbezig_idx ON tikbezig USING btree (ordernr, lijnnr,
afdeling);

CREATE INDEX tikwerkn_idx ON tikbezig USING btree (werknr);

CREATE CONSTRAINT TRIGGER "<unnamed>"
AFTER INSERT OR UPDATE ON tikbezig
FROM werkn
NOT DEFERRABLE INITIALLY IMMEDIATE
FOR EACH ROW
EXECUTE PROCEDURE "RI_FKey_check_ins"('<unnamed>', 'tikbezig',
'werkn', 'UNSPECIFIED', 'werknr', 'nr');

example
13474 01 NA 3 2004-09-24 11:02:50 2004-09-24
11:09:43 NAAIAFDELING NAAIAFDELING 2004-09-24 11:09:28
13474 01 NA 3 2004-09-24 11:02:50 2004-09-24
11:09:35 NAAIAFDELING NAAIAFDELING 2004-09-24 11:09:31
13474 01 NA 3 2004-09-24 11:02:50 2004-09-24
11:10:12 NAAIAFDELING NAAIAFDELING 2004-09-24 11:09:26
which means same computer, same person, same order on same second.

Any help is welcome

Frans

Browse pgsql-sql by date

  From Date Subject
Next Message Achilleus Mantzios 2004-09-30 10:51:53 Re: FOREIGN KEY and AccessExclusiveLock
Previous Message Paulo Nievierowski 2004-09-29 13:51:49 SELECT with Function