Re: [COMMITTERS] pgsql: Keep track of transaction commit timestamps

From: Alex Shulgin <ash(at)commandprompt(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [COMMITTERS] pgsql: Keep track of transaction commit timestamps
Date: 2014-12-04 16:47:24
Message-ID: 87r3wf2wgz.fsf@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers


Alex Shulgin <ash(at)commandprompt(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2014-12-04 16:51:56 Re: [COMMITTERS] pgsql: Keep track of transaction commit timestamps
Previous Message Peter Eisentraut 2014-12-04 16:35:27 pgsql: Fix SHLIB_PREREQS use in contrib, allowing PGXS builds

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-12-04 16:51:56 Re: [COMMITTERS] pgsql: Keep track of transaction commit timestamps
Previous Message Peter Eisentraut 2014-12-04 16:38:50 Re: Bugfix and new feature for PGXS