Re: Vacuum/visibility is busted

From: Simon Riggs <simon(at)2ndQuadrant(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 20:23:42
Message-ID: CA+U5nMLBN4eO7uVQ7p0CeOafA8ekVViAGVGsB5bE=NVaNKxQGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 7 February 2013 19:15, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
> On Thu, Feb 7, 2013 at 10:09 AM, Pavan Deolasee
> <pavan(dot)deolasee(at)gmail(dot)com> wrote:
>>
>> 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.
>
> Does anyone have suggestions on how to hack the system to make it
> fast-forward the current transaction id? It would certainly make
> testing this kind of thing faster if I could make transaction id
> increment by 100 each time a new one is generated. Then wrap-around
> could be approached in minutes rather than hours.

This is a variation of one of the regression tests...

CREATE OR REPLACE FUNCTION burn_xids (n integer)
RETURNS void
LANGUAGE plpgsql
AS $$
BEGIN
IF n <= 0 THEN RETURN; END IF;
PERFORM burn_xids(n - 1);
RETURN;
EXCEPTION WHEN raise_exception THEN NULL; END;
$$;

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2013-02-07 20:32:16 Re: Vacuum/visibility is busted
Previous Message Tom Lane 2013-02-07 20:11:40 Re: Vacuum/visibility is busted