Re: [COMMITTERS] pgsql: Keep track of transaction commit timestamps - Mailing list pgsql-hackers

From Alex Shulgin
Subject Re: [COMMITTERS] pgsql: Keep track of transaction commit timestamps
Date
Msg-id 87wq6730rc.fsf@commandprompt.com
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Keep track of transaction commit timestamps  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: [COMMITTERS] pgsql: Keep track of transaction commit timestamps  (Alex Shulgin <ash@commandprompt.com>)
List pgsql-hackers
Craig Ringer <craig@2ndquadrant.com> 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 <CatalogSnapshotData>)   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 <return> to continue, or q <return> 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)



pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: [COMMITTERS] pgsql: Keep track of transaction commit timestamps
Next
From: Tom Lane
Date:
Subject: Postgres 9.4.0 to be released week after next