On Wed, May 25, 2011 at 4:06 AM, Pascal Borschneck <borschn...@hotmail.com>wrote:
> Global question as I didn't find it: are "ERROR: duplicate key value > violates unique constraint" fatal errors ? As they may (most of the time) > be corrected with reindexdb --all > Someone told me some weeks ago "*it's only a notice, the database is not > corrupted*" ... > Well, if you get that error, then that either means that the index is confused (it has duplicate index pointers for the same value when it really shouldn't) or that the table is confused (it has duplicate rows with the supposedly unique value when it shouldn't). In the first case, a REINDEX will fix it; in the second case, your data is corrupt. But even your indexes really shouldn't be getting corrupted if everything is working properly. Are you running with fsync=off? If not, you probably want to check your drive write caches and the integrity of your hardware. This kind of thing usually means that corruption is happening somewhere, and if you don't track it down and fix it, eventually it will probably add up to something serious. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company