On Dienstag, 6. Februar 2007 08:46 Achilleas Mantzios wrote: > Thats what i mean, postmaster is alive, and accepting connections > during the above command, so what would prevent a 2nd client (from > your mail server setup most likely) > from inserting a value that is later present in the dump, > which is later attempted to be COPY'ed to the table > and ofcource that violates the PRIMARY KEY CONSTRAINT? > In other words, do you have full control of your DB when that > happens? If some 2nd client, not controled by you, inserts a value > that is later found in the dump, it is completely normal that this > ERROR will be thrown. Have you tried, for instance, disabling all > unwanted access to postmaster, e.g. through data/pg_hba.conf ? After your tip, I rechecked the old logs. There, I had "Tabelle enthält duplizierte Werte" (table contains duplicate values) but now the log message was "duplizierter Schlüssel verletzt Unique-Constraint »bayes_token_pkey«" (duplicate key violates unique constraint) The latter message is just an INFO, though its logged as ERROR. It happens when you try to INSERT a primary key that's already there, but this got only logged once: ZUSAMMENHANG: SQL-Anweisung »INSERT INTO bayes_token (id, token, spam_count, ham_count, atime) VALUES ( $1 , $2 , $3 , $4 , $5 )« PL/pgSQL function "put_tokens" line 18 at SQL statement All other times just the violation was logged. I double checked with a dump and reload to a fresh db - there is no spoon [The Matrix], and also no duplicate values exist. The error I got december 2006 with the duplicate values was really a situation where values seem to have been inserted during a reload, but before the index was there. I was just nervous and mixed the two different warnings. But I'd like to suggest changing the ERROR to WARNING for "duplicate key violates unique constraint", as it's not serious - but it sounds like a big problem. Efharisto, Achilleas! mfg zmi -- // Michael Monnerie, Ing.BSc ----- http://it-management.at // Tel: 0676/846 914 666 .network.your.ideas. // PGP Key: "curl -s http://zmi.at/zmi4.asc | gpg --import" // Fingerprint: EA39 8918 EDFF 0A68 ACFB 11B7 BA2D 060F 1C6F E6B0 // Keyserver: www.keyserver.net Key-ID: 1C6FE6B0
Attachment:
pgpWopbtAyJ8Q.pgp
Description: PGP signature