stacktrace: #4 0x00005f244651839b in ExceptionalCondition (conditionName=0x5f24465b5b28 "(result == TM_WouldBlock) || !(tuple->t_data->t_infomask & HEAP_XMAX_INVALID)", fileName=0x5f24465b4e68 "/home/jasper/postgres/src/backend/access/heap/heapam.c", lineNumber=5106) at /home/jasper/postgres/src/backend/utils/error/assert.c:66 #5 0x00005f2445dc27e8 in heap_lock_tuple (relation=0x7336487ae948, tuple=0x5f24860165d8, cid=0, mode=LockTupleExclusive, wait_policy=LockWaitBlock, follow_updates=true, buffer=0x7fff7ebcd26c, tmfd=0x7fff7ebcd350) at /home/jasper/postgres/src/backend/access/heap/heapam.c:5106 #6 0x00005f2445dca1b3 in heapam_tuple_lock (relation=0x7336487ae948, tid=0x7fff7ebcd368, snapshot=0x5f2485fb1f90, slot=0x5f2486016588, cid=0, mode=LockTupleExclusive, wait_policy=LockWaitBlock, flags=3 '\003', tmfd=0x7fff7ebcd350) at /home/jasper/postgres/src/backend/access/heap/heapam_handler.c:380 #7 0x00005f244608ebb5 in table_tuple_lock (rel=0x7336487ae948, tid=0x7fff7ebcd368, snapshot=0x5f2485fb1f90, slot=0x5f2486016588, cid=0, mode=LockTupleExclusive, wait_policy=LockWaitBlock, flags=3 '\003', tmfd=0x7fff7ebcd350) at /home/jasper/postgres/src/include/access/tableam.h:1552 #8 0x00005f244608f0fd in ExecLockRows (pstate=0x5f24860038d0) at /home/jasper/postgres/src/backend/executor/nodeLockRows.c:185 #9 0x00005f2446059ff9 in ExecProcNodeFirst (node=0x5f24860038d0) at /home/jasper/postgres/src/backend/executor/execProcnode.c:469 #10 0x00005f244604cb29 in ExecProcNode (node=0x5f24860038d0) at /home/jasper/postgres/src/include/executor/executor.h:315 #11 0x00005f244604fa46 in ExecutePlan (queryDesc=0x5f2485f46c90, operation=CMD_SELECT, sendTuples=true, numberTuples=0, direction=ForwardScanDirection, dest=0x5f2486009948) at /home/jasper/postgres/src/backend/executor/execMain.c:1697 #12 0x00005f244604d1b9 in standard_ExecutorRun (queryDesc=0x5f2485f46c90, direction=ForwardScanDirection, count=0) at /home/jasper/postgres/src/backend/executor/execMain.c:366 #13 0x00005f244604d01b in ExecutorRun (queryDesc=0x5f2485f46c90, direction=ForwardScanDirection, count=0) at /home/jasper/postgres/src/backend/executor/execMain.c:303 #14 0x00005f244632fbf0 in PortalRunSelect (portal=0x5f2485f9d9c0, forward=true, count=0, dest=0x5f2486009948) at /home/jasper/postgres/src/backend/tcop/pquery.c:921 #15 0x00005f244632f88a in PortalRun (portal=0x5f2485f9d9c0, count=9223372036854775807, isTopLevel=true, dest=0x5f2486009948, altdest=0x5f2486009948, qc=0x7fff7ebcd710) at /home/jasper/postgres/src/backend/tcop/pquery.c:765 #16 0x00005f2446328555 in exec_simple_query (query_string=0x5f2485f1cc70 "select * from t where id = 1 for update;") at /home/jasper/postgres/src/backend/tcop/postgres.c:1273 #17 0x00005f244632d996 in PostgresMain (dbname=0x5f2485f57180 "postgres", username=0x5f2485f57168 "jasper") at /home/jasper/postgres/src/backend/tcop/postgres.c:4766 #18 0x00005f2446324087 in BackendMain (startup_data=0x7fff7ebcda20, startup_data_len=24) at /home/jasper/postgres/src/backend/tcop/backend_startup.c:124 #19 0x00005f24462305f5 in postmaster_child_launch (child_type=B_BACKEND, child_slot=2, startup_data=0x7fff7ebcda20, startup_data_len=24, client_sock=0x7fff7ebcda70) at /home/jasper/postgres/src/backend/postmaster/launch_backend.c:290 #20 0x00005f2446236ccb in BackendStartup (client_sock=0x7fff7ebcda70) at /home/jasper/postgres/src/backend/postmaster/postmaster.c:3587 #21 0x00005f2446234381 in ServerLoop () at /home/jasper/postgres/src/backend/postmaster/postmaster.c:1702 #22 0x00005f2446233ce5 in PostmasterMain (argc=3, argv=0x5f2485f17170) at /home/jasper/postgres/src/backend/postmaster/postmaster.c:1400 #23 0x00005f24460dac10 in main (argc=3, argv=0x5f2485f17170) at /home/jasper/postgres/src/backend/main/main.c:227