From: Andres Freund <andres@2ndquadrant.com>
To: Maciek Sakrejda <maciek@heroku.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #8656: Duplicate data violating unique constraints
Date: Fri, 6 Dec 2013 11:07:51 +0100
Message-ID: <20131206100751.GJ7814@awork2.anarazel.de> (raw)
In-Reply-To: <CAKwe89DbQDkP9iFGesGhHH1qWiWogca2PE36DT_Ya10Cn6f1Eg@mail.gmail.com>
References: <E1VoIgB-0005Ok-3X@wrigleys.postgresql.org>
<20131205013307.GC8935@awork2.anarazel.de>
<CAKwe89A0HjOZRpZuqj70zF1QvmOxTcALNEL=a6AQdQTe+dzGKQ@mail.gmail.com>
<20131205091529.GD28793@alap2.anarazel.de>
<CAKwe89DbQDkP9iFGesGhHH1qWiWogca2PE36DT_Ya10Cn6f1Eg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 2013-12-05 17:21:04 -0800, Maciek Sakrejda wrote:
> On Thu, Dec 5, 2013 at 1:15 AM, Andres Freund <andres@2ndquadrant.com>wrote:
> The original data has been deleted, but I did manage to do PITR to a point
> that exhibits the issue:
Cool..
> => with affected_pages as (
> select distinct regexp_replace(ctid::text, '\((\d+),\d+\)', '\1') as page
> from post where id in (select id from post group by id having count(*) >
> 1)
> ) select page_header(get_raw_page('post', page::integer)) from
> affected_pages;
Hm, could you rewrite that to:
...
select * FROM affectec_pages, page_header(get_raw_page('post', page::integer));
That should work in 9.3 and will give us a much more readable result.
> => with affected_pages as (
> select distinct regexp_replace(ctid::text, '\((\d+),\d+\)', '\1') as page
> from post where id in (select id from post group by id having count(*) >
> 1)
> ) select heap_page_items(get_raw_page('post', page::integer)) from
> affected_pages;
Same here.
Thanks!
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: andres@2ndquadrant.com, maciek@heroku.com, alvherre@2ndquadrant.com
Subject: Re: BUG #8656: Duplicate data violating unique constraints
In-Reply-To: <20131206100751.GJ7814@awork2.anarazel.de>
References: <E1VoIgB-0005Ok-3X@wrigleys.postgresql.org> <20131205013307.GC8935@awork2.anarazel.de> <CAKwe89A0HjOZRpZuqj70zF1QvmOxTcALNEL=a6AQdQTe+dzGKQ@mail.gmail.com> <20131205091529.GD28793@alap2.anarazel.de> <CAKwe89DbQDkP9iFGesGhHH1qWiWogca2PE36DT_Ya10Cn6f1Eg@mail.gmail.com> <20131206100751.GJ7814@awork2.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox