From: Andres Freund <andres@2ndquadrant.com>
To: pgsql-bugs@postgresql.org
Cc: Valentine Gogichashvili <valgog@gmail.com>
Cc: Simon Riggs <simon@2ndquadrant.com>
Subject: Re: BUG #6661: out-of-order XID insertion in KnownAssignedXids
Date: Fri, 8 Jun 2012 13:40:45 +0200
Message-ID: <201206081340.45246.andres@2ndquadrant.com> (raw)
In-Reply-To: <201206081242.00890.andres@2ndquadrant.com>
References: <E1SWwkh-0000M9-Rj@wrigleys.postgresql.org>
<CAP93muVVdeMZf2zP2-dJ6pZy0bUKffgXaSf5FuuUKj4q1S8PcA@mail.gmail.com>
<201206081242.00890.andres@2ndquadrant.com>
Hi All,
On Friday, June 08, 2012 12:42:00 PM Andres Freund wrote:
> On Friday, June 08, 2012 12:25:25 PM Valentine Gogichashvili wrote:
> > unfortunately I did not manage to keep the snapshot of the database, that
> > had this issue.
Ok, after some playing I could reproduce the issue:
master:
S1: CREATE FUNCTION insertone() RETURNS void LANGUAGE plpgsql AS $$BEGIN
INSERT INTO data(data) VALUES (random()); EXCEPTION WHEN division_by_zero THEN
RAISE NOTICE 'huh'; END;$$;
S1: BEGIN;
S1: SELECT insertone() FROM generate_series(1, 1000); --subxid overflow
S2: BEGIN;
S2: SELECT insertone(); --allocate xid
standby:
pg_basebackup
LOG: 00000: consistent recovery state reached at 0/5C0001C0
LOG: 00000: recovery snapshot waiting for non-overflowed snapshot or until
oldest active xid on standby is at least 4752 (now 3750)
master:
S1: commit:
S3: checkpoint;
standby:
before patch:
crash in assert/elog
after:
LOG: 00000: recovery snapshots are now enabled
So I can confirm the above patch fixes at least that bug.
Andres
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
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, valgog@gmail.com, simon@2ndquadrant.com
Subject: Re: BUG #6661: out-of-order XID insertion in KnownAssignedXids
In-Reply-To: <201206081340.45246.andres@2ndquadrant.com>
References: <E1SWwkh-0000M9-Rj@wrigleys.postgresql.org> <CAP93muVVdeMZf2zP2-dJ6pZy0bUKffgXaSf5FuuUKj4q1S8PcA@mail.gmail.com> <201206081242.00890.andres@2ndquadrant.com> <201206081340.45246.andres@2ndquadrant.com>
* 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