Re: Vacuum/visibility is busted

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Vacuum/visibility is busted
Date: 2013-02-07 17:18:35
Message-ID: CAMkU=1xYSgri0Mg83yis5vH90n=q5LJPeTnY25NLBDh10RL0oQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 7, 2013 at 1:44 AM, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com> wrote:
> On Thu, Feb 7, 2013 at 2:25 PM, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com> wrote:
>
>>
>> Will look more into it, but thought this might be useful for others to
>> spot the problem.
>>
>
> And here is some more forensic info about one of the pages having
> duplicate tuples.
>
> jjanes=# select *, xmin, xmax, ctid from foo where index IN (select
> index from foo group by index having count(*) > 1 ORDER by index)
> ORDER by index LIMIT 3;
> index | count | xmin | xmax | ctid
> -------+-------+------------+------+-----------
> 219 | 353 | 2100345903 | 0 | (150,98)
> 219 | 354 | 2100346051 | 0 | (150,101)
> 219 | 464 | 2101601086 | 0 | (150,126)
> (3 rows)

The one where count=464 should be the correct one to be visible, and
the other two are old tuples that were updated away. (The test driver
increases the count column monotonically for each any given value of
index column.

Cheers,

Jeff

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2013-02-07 17:21:16 Re: proposal: ANSI SQL 2011 syntax for named parameters
Previous Message Peter Eisentraut 2013-02-07 17:13:54 Re: split rm_name and rm_desc out of rmgr.c