Re: BUG #4913: Row missing from primary key index - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #4913: Row missing from primary key index
Date
Msg-id 8848.1247181216@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #4913: Row missing from primary key index  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Responses Re: BUG #4913: Row missing from primary key index  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
List pgsql-bugs
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> This was first reported on IRC and I spent a little time working with
> the OP trying to dig up info to suggest a cause; here is the relevent
> data (all provided by the OP at my request). I have not been able to
> suggest a possible cause based on this.

> shs=# select ctid,xmin,xmax,cmin,cmax,* from log_event where id = 15723018;
>     ctid    | xmin  | xmax | cmin | cmax |    id    | user_id |      ip       | action_id | object1_id | object2_id |
    event_timestamp        
>
------------+-------+------+------+------+----------+---------+---------------+-----------+------------+------------+----------------------------
>  (79844,13) | 16410 |    0 |    0 |    0 | 15723018 |       0 | 79.65.40.251  |         4 |      10145 |            |
2009-05-0913:47:48.68558 
>  (79870,70) | 16479 |    0 |    0 |    0 | 15723018 |       1 | 80.200.87.228 |         1 |            |            |
2009-05-0913:47:33.441668 
> (2 rows)

> Notice that the two rows seem entirely independent (different xmin).
> The OP stated that his app generally does single-row inserts (with
> some exceptions not relevent here); however, we found a nearby row
> which shares the xmin:

>  (79870,16)  | 16410 |    0 |    0 |    0 | 15722964 |       1 | 80.200.87.228   |         3 |        720 |
| 2009-05-09 13:41:53.099589 

How is the timestamp column generated?  I'm wondering what we can deduce
from the fact that the timestamps are all different.  It's evidently not
now().

One thing that seems odd is that the xids are kinda small.  Did the
system just recently have a wraparound event?

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #4912: server core dumps on xslt_process with empty param string
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #4913: Row missing from primary key index