![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Notice that 3787433 is duplicated. How could this have happened if that column is flagged as the primary key. Even more interesting: select oid, fileid, userid from files where userid = 1898598 order by fileid; oid | fileid | userid ----------+---------+--------- 1573737 | 3787433 | 1898598 1573737 | 3787433 | 1898598 1573820 | 3787563 | 1898598 18612041 | 9554275 | 1898598 |
|
I suspect a corrupt index is at fault here. |
#3
| |||
| |||
|
|
The system is running on a Dell PowerEdge 2650 running RedHat 8. We had a kernel halt about two weeks ago that was caused by one of our disk mirrors failing. It could be that these problems were caused at that point in time and are just being noticed now. |
|
But you never stated how to delete the duplicate rows. Any suggestions? |
#4
| |||
| |||
|
|
It appears that I can select the rows, but not delete or update them. |
#5
| |||
| |||
|
|
It would be interesting to see the ctid, xmin, cmin, and xmax fields as well. |
|
Possibly, but the duplicate OID entries suggest that a row was updated and then for some reason the old version appears to still be valid. (Or an attempted update was rolled back, but the new version got marked |
|
valid anyway.) Have you had any crashes or other strange behavior lately? |
#6
| |||
| |||
|
|
Zeki Mokhtarzada <zeki (AT) freewebz (DOT) com> writes: The system is running on a Dell PowerEdge 2650 running RedHat 8. We had a kernel halt about two weeks ago that was caused by one of our disk mirrors failing. It could be that these problems were caused at that point in time and are just being noticed now. Not sure. xmin=2 (FrozenXid) implies that those rows have been like that for a good long time (~ 1 billion transactions). But you never stated how to delete the duplicate rows. Any suggestions? You can select 'em by ctid, viz WHERE ctid = '(53101,30)' regards, tom lane |
![]() |
| Thread Tools | |
| Display Modes | |
| |