Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XwY7R-0003Hp-Tx for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Dec 2014 15:15:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XwY7R-0008PO-E4 for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Dec 2014 15:15:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XwY7Q-0008PD-7s for pgsql-hackers@postgreSQL.org; Thu, 04 Dec 2014 15:15:00 +0000 Received: from lists.commandprompt.com ([69.168.55.30]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XwY7K-000354-Ab for pgsql-hackers@postgreSQL.org; Thu, 04 Dec 2014 15:14:58 +0000 Received: from titan (spinlock.commandprompt.com [69.168.55.30]) by lists.commandprompt.com (Postfix) with ESMTPA id CCDE924F; Thu, 4 Dec 2014 07:14:49 -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 07:14:47 -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> Date: Thu, 04 Dec 2014 18:14:47 +0300 In-Reply-To: <5480796B.7020203@2ndquadrant.com> (Craig Ringer's message of "Thu, 04 Dec 2014 23:10:35 +0800") Message-ID: <87wq6730rc.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-06089-11975 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 Craig Ringer writes: > On 12/04/2014 10:50 PM, Alex Shulgin wrote: >> Is there a way to pause the bootstrap process so I can attach gdb to it? > > With a newer gdb, you can instead tell gdb to follow all forks. I wrote > some notes on it recently. > > http://blog.2ndquadrant.com/processes-breakpoints-watchpoints-postgresql/ > > I've found it really handy when debugging crashes in regression tests. > > However, it's often simpler to just: > > ulimit -c unlimited > make check > > (or whatever your crashing test is) then look at the core files that are > produced. Good one, it didn't occur to me that assert makes core files. 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) Program received signal SIGABRT, Aborted. 0x00007f2757128d27 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007f2757128d27 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00007f275712a418 in __GI_abort () at abort.c:89 #2 0x00000000009088b2 in ExceptionalCondition ( conditionName=0xac0710 "!(((xmax) >= ((TransactionId) 3)))", errorType=0xac01d8 "FailedAssertion", fileName=0xac0178 "/home/ash/src/postgresql/src/backend/storage/ipc/procarray.c", lineNumber=1414) at /home/ash/src/postgresql/src/backend/utils/error/assert.c:54 #3 0x000000000079e125 in GetSnapshotData ( snapshot=0xdb2d60 ) at /home/ash/src/postgresql/src/backend/storage/ipc/procarray.c:1414 #4 0x000000000094e02d in GetNonHistoricCatalogSnapshot (relid=1255) at /home/ash/src/postgresql/src/backend/utils/time/snapmgr.c:298 #5 0x000000000094dfdd in GetCatalogSnapshot (relid=1255) at /home/ash/src/postgresql/src/backend/utils/time/snapmgr.c:272 #6 0x00000000004c8f0d in systable_beginscan (heapRelation=0x1d0e5c0, indexId=2691, indexOK=1 '\001', snapshot=0x0, nkeys=1, key=0x7fff201bbc40) at /home/ash/src/postgresql/src/backend/access/index/genam.c:275 #7 0x0000000000885070 in regprocin (fcinfo=0x7fff201bbce0) at /home/ash/src/postgresql/src/backend/utils/adt/regproc.c:106 #8 0x0000000000914fe7 in InputFunctionCall (flinfo=0x7fff201bc0c0, str=0x1d349b8 "varchar_transform", typioparam=24, typmod=-1) ---Type to continue, or q to quit--- at /home/ash/src/postgresql/src/backend/utils/fmgr/fmgr.c:1914 #9 0x000000000091533e in OidInputFunctionCall (functionId=44, str=0x1d349b8 "varchar_transform", typioparam=24, typmod=-1) at /home/ash/src/postgresql/src/backend/utils/fmgr/fmgr.c:2045 #10 0x000000000052af91 in InsertOneValue (value=0x1d349b8 "varchar_transform", i=7) at /home/ash/src/postgresql/src/backend/bootstrap/bootstrap.c:840 #11 0x0000000000527409 in boot_yyparse () at /home/ash/src/postgresql/src/backend/bootstrap/bootparse.y:455 #12 0x000000000052a26b in BootstrapModeMain () at /home/ash/src/postgresql/src/backend/bootstrap/bootstrap.c:494 #13 0x000000000052a177 in AuxiliaryProcessMain (argc=6, argv=0x1cc8378) at /home/ash/src/postgresql/src/backend/bootstrap/bootstrap.c:414 #14 0x00000000006a327c in main (argc=7, argv=0x1cc8370) at /home/ash/src/postgresql/src/backend/main/main.c:212 (gdb) -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers