Re: Vacuum/visibility is busted

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

On Thu, Feb 7, 2013 at 10:48 PM, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
> On Thu, Feb 7, 2013 at 1:44 AM, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com> wrote:

>>
>> 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.
>

Right. I don't have the database handy at this moment, but earlier in
the day I ran some queries against it and found that most of the
duplicates which are not accessible via indexes have xmin very close
to 2100345903. In fact, many of them are from a consecutive range.

Thanks,
Pavan
--
Pavan Deolasee
http://www.linkedin.com/in/pavandeolasee

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-02-07 18:30:13 Re: Identity projection
Previous Message Alvaro Herrera 2013-02-07 17:52:11 Re: Vacuum/visibility is busted