(gdb) bt #0 0x00007fa235a73fe0 in read () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x00000000006249fd in read (__nbytes=8192, __buf=0x7fa21f8d7ee0, __fd=) at /usr/include/x86_64-linux-gnu/bits/unistd.h:45 #2 FileRead (file=, buffer=0x7fa21f8d7ee0 "RI", amount=8192) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/storage/file/fd.c:1191 #3 0x000000000063d856 in mdread (reln=, forknum=, blocknum=253211, buffer=0x7fa21f8d7ee0 "RI") at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/storage/smgr/md.c:646 #4 0x0000000000620556 in ReadBuffer_common (smgr=, relpersistence=112 'p', forkNum=MAIN_FORKNUM, blockNum=253211, mode=RBM_NORMAL, strategy=, hit=0x7fffa31cb7df "") at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/storage/buffer/bufmgr.c:440 #5 0x0000000000621014 in ReadBufferExtended (reln=0x18678a0, forkNum=MAIN_FORKNUM, blockNum=253211, mode=RBM_NORMAL, strategy=) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/storage/buffer/bufmgr.c:246 #6 0x000000000046ff81 in heapgetpage (scan=0x2202340, page=253211) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/access/heap/heapam.c:230 #7 0x000000000047049a in heapgettup_pagemode (scan=0x2202340, dir=, nkeys=0, key=0x0) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/access/heap/heapam.c:824 #8 0x0000000000471506 in heap_getnext (scan=0x2202340, direction=) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/access/heap/heapam.c:1349 #9 0x000000000058a50b in SeqNext (node=) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/executor/nodeSeqscan.c:66 #10 0x0000000000579fa3 in ExecScanFetch (recheckMtd=0x58a4d0 , accessMtd=0x58a4e0 , node=0x2201590) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/executor/execScan.c:82 #11 ExecScan (node=0x2201590, accessMtd=0x58a4e0 , recheckMtd=0x58a4d0 ) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/executor/execScan.c:167 #12 0x0000000000572a98 in ExecProcNode (node=0x2201590) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/executor/execProcnode.c:394 #13 0x000000000058587a in ExecLockRows (node=0x22013a0) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/executor/nodeLockRows.c:54 #14 0x0000000000572948 in ExecProcNode (node=0x22013a0) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/executor/execPro---Type to continue, or q to quit--- cnode.c:486 #15 0x000000000056fd62 in ExecutePlan (dest=0xafdea0, direction=, numberTuples=1, sendTuples=1 '\001', operation=CMD_SELECT, planstate=0x22013a0, estate=0x22011e0) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/executor/execMain.c:1442 #16 standard_ExecutorRun (queryDesc=0x21ff220, direction=, count=1) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/executor/execMain.c:316 #17 0x000000000059341d in _SPI_pquery (tcount=, fire_triggers=0 '\000', queryDesc=) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/executor/spi.c:2110 #18 _SPI_execute_plan (paramLI=0x21ff1d0, snapshot=, crosscheck_snapshot=0x0, read_only=0 '\000', fire_triggers=0 '\000', tcount=1, plan=) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/executor/spi.c:1922 #19 0x000000000059386e in SPI_execute_snapshot (plan=0x204a7d0, Values=0x7fffa31cbcc0, Nulls=0x7fffa31cbed0 " ", snapshot=0x0, crosscheck_snapshot=0x0, read_only=0 '\000', fire_triggers=0 '\000', tcount=1) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/executor/spi.c:462 #20 0x00000000006c8d50 in ri_PerformCheck (qkey=0x7fffa31cbf90, qplan=0x204a7d0, fk_rel=0x18678a0, pk_rel=0x1868c00, old_tuple=0x7fffa31cca00, new_tuple=0x0, detectNewRows=1 '\001', expect_OK=5, constrname=0x7fffa31cc0d4 "api_apirecordconv_rec_submission_id_fkey") at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/utils/adt/ri_triggers.c:3427 #21 0x00000000006ca1f5 in RI_FKey_noaction_del (fcinfo=) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/utils/adt/ri_triggers.c:818 #22 0x0000000000555fda in ExecCallTriggerFunc (trigdata=0x7fffa31cc9d0, tgindx=0, finfo=0x202c9b0, instr=0x0, per_tuple_context=) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/commands/trigger.c:1831 #23 0x000000000055668f in AfterTriggerExecute (per_tuple_context=0x2038280, instr=0x0, finfo=0x202c9b0, rel=0x1868c00, event=0x21983a8, trigdesc=) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/commands/trigger.c:3369 #24 afterTriggerInvokeEvents (events=0x1617ee0, firing_id=13, estate=0x202c670, delete_ok=) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/commands/trigger.c:3548 #25 0x000000000055baf5 in AfterTriggerFireDeferred () at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/commands/trigger---Type to continue, or q to quit--- .c:3795 #26 0x000000000048c8e5 in CommitTransaction () at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/access/transam/xact.c:1785 #27 0x000000000048cf3d in CommitTransactionCommand () at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/access/transam/xact.c:2563 #28 0x000000000064017b in finish_xact_command () at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/tcop/postgres.c:2452 #29 finish_xact_command () at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/tcop/postgres.c:2441 #30 0x00000000006437dd in exec_simple_query (query_string=0x16e9e60 "COMMIT;") at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/tcop/postgres.c:1051 #31 PostgresMain (argc=, argv=, dbname=0x1613cc0 "siphon", username=) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/tcop/postgres.c:3976 #32 0x0000000000604443 in BackendRun (port=0x16570a0) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/postmaster/postmaster.c:3612 #33 BackendStartup (port=0x16570a0) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/postmaster/postmaster.c:3302 #34 ServerLoop () at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/postmaster/postmaster.c:1466 #35 0x0000000000604eb1 in PostmasterMain (argc=, argv=) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/postmaster/postmaster.c:1127 #36 0x000000000045a720 in main (argc=5, argv=0x1613180) at /build/buildd/postgresql-9.1-9.1.11/build/../src/backend/main/main.c:199