Re: pg primary key bug? - Mailing list pgsql-sql

From pginfo
Subject Re: pg primary key bug?
Date
Msg-id 4214D5C3.4070107@t1.unisoftbg.com
Whole thread Raw
In response to Re: pg primary key bug?  (Richard_D_Levine@raytheon.com)
Responses Re: pg primary key bug?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Hi,<br /><br /> Tom Lane wrote:<br /><blockquote cite="mid9340.1108664352@sss.pgh.pa.us" type="cite"><pre
wrap="">pginfo<a class="moz-txt-link-rfc2396E"
href="mailto:pginfo@t1.unisoftbg.com"><pginfo@t1.unisoftbg.com></a>writes: </pre><blockquote type="cite"><pre
wrap="">TomLane wrote:   </pre><blockquote type="cite"><pre wrap="">Could we see the system columns on these rows?
</pre></blockquote></blockquote><prewrap=""> </pre><blockquote type="cite"><pre wrap="">01=# select
oid,xmin,cmin,xmax,cmax,ctid,*from a_constants_str where 
 
constname='DOCPLAID'; oid  |  xmin   |  cmin   |  xmax   | cmax |  ctid  | constname | fid | 
constvalue
-------+---------+---------+---------+------+--------+-----------+-----+------------17916 | 2232893 | 2235861 | 2235861
|  42 | (4,71) | DOCPLAID  |   0 | 
 
SOF_1973817916 | 2232893 | 2235861 | 2235861 |   41 | (7,62) | DOCPLAID  |   0 | 
SOF_19738
(2 rows)   </pre></blockquote><pre wrap="">
Given the identical OID and xmin values, it seems certain that these are
the "same" row, ie there was only one insertion event.  My bet is that
the one at (7,62) is the original, and that the one at (4,71) is a copy
that was made by VACUUM FULL trying to move the row to compact the
table.  So the question is how did both copies get to be marked
simultaneously valid?  That should be impossible, unless a disk write
got dropped.  Have you had any system crashes during VACUUM FULL
operations recently?
        regards, tom lane

 </pre></blockquote> I do not know exact, but it is possible.<br /> This is customer server and I do not have any info
aboutserver/os crash, but I am 100% sure.<br /> I will ask as soon as possible and replay.<br /> Also I will check the
logs.<br/> We start pg witl pg_ctl ...-D... -l  /logfile  and if we can found the needet info in pg log file I can
checkit ( I do not nkow what to search in this file).<br /> We are running vacuum once per 24 h.<br /> The OS is RedHat
AS3.<br /> PostgreSQL is 7.4.1 (but we have the same problem on 7.4.5).<br /><br /> Will upgrade to 8.0 solve this type
ofproblems ?<br /><br /> regards,<br /> ivan.<br /> 

pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg primary key bug?
Next
From: Tom Lane
Date:
Subject: Re: pg primary key bug?