![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Problem: in some cases we experience the following problem - we have found in the database some _absolutely_ identical rows, despite the fact, that we have defined some unique (!) indexes on some of the fields and even primary (!) keys, we can see, that the rows are _exactly_ the same. In some cases we have seen up to 7 absolutely identical rows, with the same primary keys and the same unique indexed fields. |
#3
| |||
| |||
|
|
When you are experiencing this show us the result of this query: select cmax, cmin, xmax, xmin, * from <table> where <your condition>; |
#4
| |||
| |||
|
|
Gaetano Mendola <mendola (AT) bigfoot (DOT) com> writes: When you are experiencing this show us the result of this query: select cmax, cmin, xmax, xmin, * from <table> where <your condition>; Also, please, the ctid and oid columns (but leave out oid if you made the table WITHOUT OIDS). Also, if the condition is one that will normally use an index, try the same query with and without "set enable_indexscan = off". It could be that a corrupted index would cause the query to visit the same rows multiple times (or miss rows!). It might be a good idea to REINDEX the primary-key index on the table, but I would counsel not doing so until we have more data on what's happening. If the problem is index corruption then REINDEX would destroy all the evidence ... regards, tom lane |
![]() |
| Thread Tools | |
| Display Modes | |
| |