Unanswered: Duplicated rows with the same primary key
I use PostgreSQL 7.3 on Windows in Cygwin installation. Data base are used by java application via jdbc (pg73jdbc3.jar). I use only one connection which are sometimes shared beetween several threads, but the methods which manipulate on the same tables are synchronized. From times to times I see multiple rows with the same value of primary keys. It cause that my application works wrong. I have no idea what I do wrong and what I can make better. Any suggestions?
I haven't seen it in my database, but in database of our clients. They can make a buckup with a java program which dump a database to a xml file. And the restore of data on my database from this file is of course not possible because of duplicated keys which I can also see in xml file. Furthermore our application make a log of all error witch have somethig in common with database. I have seen an error "Can't insert ....because of duplicate key" from database which occurd in the line of code that do sql UPDATE!! I don't consider that it's surely a fault of database. Maybe it's a fault of jdbc driver, maybe cygwin cause that database don't work corretly. Perhaps I should use more than one connection to simultaneous work of threads on database. Please trust me, I really have this problem, I'm sure that there are primary keys and I'm sure that I see it correctly. It happens only on databases larger than 500 MB.
Ok. If someone wants to see that duplicated keys I will send a database. Size of compressed files with database is 4MB. Please email me (email@example.com) and I will send a archive in a way that you choose. I hope that nobody will say that I had prepared the files. Thanks.