Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XwZf0-0007wp-8u for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Dec 2014 16:53:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XwZez-00024P-Ov for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Dec 2014 16:53:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XwZZ0-0007wM-NK for pgsql-hackers@postgreSQL.org; Thu, 04 Dec 2014 16:47:34 +0000 Received: from lists.commandprompt.com ([69.168.55.30]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XwZYw-00041y-QU for pgsql-hackers@postgreSQL.org; Thu, 04 Dec 2014 16:47:32 +0000 Received: from titan (spinlock.commandprompt.com [69.168.55.30]) by lists.commandprompt.com (Postfix) with ESMTPA id 5608C1E8; Thu, 4 Dec 2014 08:47:27 -0800 (PST) Received: from titan ([195.216.213.70] helo=titan) by assp.commandprompt.com with ESMTPS(AES128-SHA) (2.1.1); 4 Dec 2014 08:47:25 -0800 From: Alex Shulgin To: Craig Ringer Cc: Alvaro Herrera , Heikki Linnakangas , PostgreSQL-development Subject: Re: [COMMITTERS] pgsql: Keep track of transaction commit timestamps References: <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> Date: Thu, 04 Dec 2014 19:47:24 +0300 In-Reply-To: <87wq6730rc.fsf@commandprompt.com> (Alex Shulgin's message of "Thu, 04 Dec 2014 18:14:47 +0300") Message-ID: <87r3wf2wgz.fsf@commandprompt.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Assp-Version: 2.1.1(11364) on assp.commandprompt.com X-Assp-Client-TLS: yes X-Assp-ID: assp.commandprompt.com m1-11647-09647 X-Assp-Envelope-From: ash@commandprompt.com X-Assp-Intended-For: pgsql-hackers@postgreSQL.org X-Assp-Original-Subject: Re: [HACKERS] [COMMITTERS] pgsql: Keep track of transaction commit timestamps X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Alex Shulgin 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 ) 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