pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: destroyed db/index (corruption) [SOLVED]
2+ messages / 2 participants
[nested] [flat]
* Re: destroyed db/index (corruption) [SOLVED]
@ 2007-02-07 22:07 Michael Monnerie <michael.monnerie@it-management.at>
2007-02-08 07:06 ` Re: destroyed db/index (corruption) [SOLVED] Achilleas Mantzios <achill@matrix.gatewaynet.com>
0 siblings, 1 reply; 2+ messages in thread
From: Michael Monnerie @ 2007-02-07 22:07 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: destroyed db/index (corruption) [SOLVED]
2007-02-07 22:07 Re: destroyed db/index (corruption) [SOLVED] Michael Monnerie <michael.monnerie@it-management.at>
@ 2007-02-08 07:06 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
0 siblings, 0 replies; 2+ messages in thread
From: Achilleas Mantzios @ 2007-02-08 07:06 UTC (permalink / raw)
To: pgsql-admin
Στις Πέμπτη 08 Φεβρουάριος 2007 00:07, ο/η Michael Monnerie έγραψε:
>
> 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.
>
I dont think that would be appropriate. Attempt to violate a UNIQUE CONSTRAINT
is an erroneous act.
> Efharisto, Achilleas!
Bitte Sen!
>
> mfg zmi
--
Achilleas Mantzios
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2007-02-08 07:06 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-02-07 22:07 Re: destroyed db/index (corruption) [SOLVED] Michael Monnerie <michael.monnerie@it-management.at>
2007-02-08 07:06 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox