pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alex Shulgin <ash@commandprompt.com>
To: Craig Ringer <craig@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [COMMITTERS] pgsql: Keep track of transaction commit timestamps
Date: Thu, 04 Dec 2014 19:47:24 +0300
Message-ID: <87r3wf2wgz.fsf@commandprompt.com> (raw)
In-Reply-To: <87wq6730rc.fsf@commandprompt.com>
References: <E1XwBJu-0000Oh-PA@gemulon.postgresql.org>
	<54802C7F.90606@vmware.com>
	<87d27z4i0b.fsf@commandprompt.com>
	<20141204143555.GA26945@alvh.no-ip.org>
	<87388v4ggf.fsf@commandprompt.com>
	<5480796B.7020203@2ndquadrant.com>
	<87wq6730rc.fsf@commandprompt.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>


Alex Shulgin <ash@commandprompt.com> writes:
>
> Figured it out with a pg_usleep in bootstrap.c anyway.  Does this look sane?
>
>
> DEBUG:  inserting column 6 value "0"
> DEBUG:  inserted -> 0
> DEBUG:  inserting column 7 value "varchar_transform"
> TRAP: FailedAssertion("!(((xmax) >= ((TransactionId) 3)))", File: "/home/ash/src/postgresql/src/backend/storage/ipc/procarray.c", Line: 1414)

I've tried to debug this and I feel really dumbfound...


DEBUG:  inserting column 7 value "varchar_transform"

Breakpoint 1, GetSnapshotData (snapshot=0xdb2d60 <CatalogSnapshotData>)
    at /home/ash/src/postgresql/src/backend/storage/ipc/procarray.c:1413
1413		xmax = ShmemVariableCache->latestCompletedXid;

(gdb) p ShmemVariableCache->latestCompletedXid 
$1 = 4294967295

(gdb) p *ShmemVariableCache
$2 = {nextOid = 10000, oidCount = 0, nextXid = 3, oldestXid = 3, 
  xidVacLimit = 200000003, xidWarnLimit = 2136483650, 
  xidStopLimit = 2146483650, xidWrapLimit = 2147483650, oldestXidDB = 1, 
  oldestCommitTs = 1, newestCommitTs = 0, latestCompletedXid = 4294967295}

(gdb) p xmax
$3 = 0

(gdb) n
1414		Assert(TransactionIdIsNormal(xmax));

(gdb) p xmax
$4 = 1

(gdb) p *ShmemVariableCache
$5 = {nextOid = 10000, oidCount = 0, nextXid = 3, oldestXid = 3, 
  xidVacLimit = 200000003, xidWarnLimit = 2136483650, 
  xidStopLimit = 2146483650, xidWrapLimit = 2147483650, oldestXidDB = 1, 
  oldestCommitTs = 1, newestCommitTs = 0, latestCompletedXid = 4294967295}

(gdb) p ShmemVariableCache->latestCompletedXid 
$6 = 4294967295

(gdb) 


How?  Is there an another concurrent process with the old view of
VariableCacheData struct where latestCompletedXid still points to
oldestCommitTs?

This only happens with the CommitTs commit in effect.

--
Alex


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (28+ messages)  latest in thread

Message-ID: <87r3wf2wgz.fsf@commandprompt.com>
Permalink:  ../87r3wf2wgz.fsf@commandprompt.com/
Also on:    postgresql.org/message-id/87r3wf2wgz.fsf@commandprompt.com

 · 

reply

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-committers@postgresql.org
  Cc: ash@commandprompt.com, craig@2ndquadrant.com, alvherre@2ndquadrant.com, hlinnakangas@vmware.com, pgsql-hackers@postgreSQL.org
  Subject: Re: [COMMITTERS] pgsql: Keep track of transaction commit timestamps
  In-Reply-To: <87r3wf2wgz.fsf@commandprompt.com>
  References: <E1XwBJu-0000Oh-PA@gemulon.postgresql.org> <54802C7F.90606@vmware.com> <87d27z4i0b.fsf@commandprompt.com> <20141204143555.GA26945@alvh.no-ip.org> <87388v4ggf.fsf@commandprompt.com> <5480796B.7020203@2ndquadrant.com> <87wq6730rc.fsf@commandprompt.com> <87r3wf2wgz.fsf@commandprompt.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