Re: BUG #4913: Row missing from primary key index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: pgsql-bugs(at)postgresql(dot)org, mathieu(at)dezutter(dot)org ("Mathieu De Zutter")
Subject: Re: BUG #4913: Row missing from primary key index
Date: 2009-07-09 23:13:36
Message-ID: 8848.1247181216@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)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-09 13:47:48.68558
> (79870,70) | 16479 | 0 | 0 | 0 | 15723018 | 1 | 80.200.87.228 | 1 | | | 2009-05-09 13: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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dan Boeriu 2009-07-09 23:21:31 BUG #4914: uuid_generate_v4 not present in either source or yum/rpm
Previous Message Tom Lane 2009-07-09 23:08:21 Re: BUG #4912: server core dumps on xslt_process with empty param string