Hi,
Another one caught by sqlsmith, on the regression database run this
query (using any non-partitioned table works fine):
"""
select currtid('pagg_tab'::regclass::oid, '(0,156)'::tid) >= '(1,158)'::tid;
"""
This works on 11 (well it gives an error because the file doesn't
exists) but crash the server on 12+
attached the stack trace from master
--
Jaime Casanova www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
#0 0x0000000000a3a3f1 in table_beginscan_tid (rel=0x7ff8ad4d01b8,
snapshot=0x1336430) at ../../../../src/include/access/tableam.h:842
flags = 8
#1 0x0000000000a3b1e3 in currtid_byreloid (fcinfo=0x130c298) at tid.c:384
reloid = 37534
tid = 0x128f498
result = 0x135b960
rel = 0x7ff8ad4d01b8
aclresult = ACLCHECK_OK
snapshot = 0x1336430
scan = 0x10
#2 0x00000000006fc889 in ExecInterpExpr (state=0x130c100, econtext=0x130be00,
isnull=0x7fff1f9659e7) at execExprInterp.c:698
fcinfo = 0x130c298
args = 0x130c2b8
nargs = 2
d = 140733723337632
op = 0x130c2f0
resultslot = 0x130c008
innerslot = 0x0
outerslot = 0x0
scanslot = 0x0
dispatch_table = {0x6fc140 <ExecInterpExpr+147>, 0x6fc165
<ExecInterpExpr+184>, 0x6fc19b <ExecInterpExpr+238>, 0x6fc1d4
<ExecInterpExpr+295>,
0x6fc20d <ExecInterpExpr+352>, 0x6fc296 <ExecInterpExpr+489>,
0x6fc31f <ExecInterpExpr+626>, 0x6fc3a8 <ExecInterpExpr+763>, 0x6fc3d7
<ExecInterpExpr+810>,
0x6fc406 <ExecInterpExpr+857>, 0x6fc435 <ExecInterpExpr+904>,
0x6fc463 <ExecInterpExpr+950>, 0x6fc50a <ExecInterpExpr+1117>, 0x6fc5b1
<ExecInterpExpr+1284>,
0x6fc658 <ExecInterpExpr+1451>, 0x6fc6b3 <ExecInterpExpr+1542>,
0x6fc756 <ExecInterpExpr+1705>, 0x6fc78c <ExecInterpExpr+1759>,
0x6fc7f9 <ExecInterpExpr+1868>, 0x6fc8c8 <ExecInterpExpr+2075>,
0x6fc8f6 <ExecInterpExpr+2121>, 0x6fc924 <ExecInterpExpr+2167>,
0x6fc92f <ExecInterpExpr+2178>, 0x6fc997 <ExecInterpExpr+2282>,
0x6fc9f0 <ExecInterpExpr+2371>, 0x6fc9fb <ExecInterpExpr+2382>,
0x6fca63 <ExecInterpExpr+2486>, 0x6fcabc <ExecInterpExpr+2575>,
0x6fcaf4 <ExecInterpExpr+2631>, 0x6fcb69 <ExecInterpExpr+2748>,
0x6fcb94 <ExecInterpExpr+2791>, 0x6fcbdf <ExecInterpExpr+2866>,
0x6fcc2d <ExecInterpExpr+2944>, 0x6fcc88 <ExecInterpExpr+3035>,
0x6fccca <ExecInterpExpr+3101>, 0x6fcd0f <ExecInterpExpr+3170>,
0x6fcd3d <ExecInterpExpr+3216>, 0x6fcd6b <ExecInterpExpr+3262>,
0x6fcda5 <ExecInterpExpr+3320>, 0x6fce08 <ExecInterpExpr+3419>,
0x6fce6b <ExecInterpExpr+3518>, 0x6fcea5 <ExecInterpExpr+3576>,
0x6fced3 <ExecInterpExpr+3622>, 0x6fcf01 <ExecInterpExpr+3668>,
0x6fcf31 <ExecInterpExpr+3716>, 0x6fd01d <ExecInterpExpr+3952>,
0x6fd073 <ExecInterpExpr+4038>, 0x6fd25b <ExecInterpExpr+4526>,
0x6fd34e <ExecInterpExpr+4769>, 0x6fd432 <ExecInterpExpr+4997>,
0x6fd50e <ExecInterpExpr+5217>, 0x6fd535 <ExecInterpExpr+5256>,
0x6fd55c <ExecInterpExpr+5295>, 0x6fd583 <ExecInterpExpr+5334>,
0x6fd5aa <ExecInterpExpr+5373>, 0x6fd5d8 <ExecInterpExpr+5419>,
0x6fd5ff <ExecInterpExpr+5458>, 0x6fd745 <ExecInterpExpr+5784>,
0x6fd849 <ExecInterpExpr+6044>, 0x6fd870 <ExecInterpExpr+6083>,
0x6fd89e <ExecInterpExpr+6129>, 0x6fd8cc <ExecInterpExpr+6175>,
0x6fd8fa <ExecInterpExpr+6221>, 0x6fd950 <ExecInterpExpr+6307>,
0x6fd977 <ExecInterpExpr+6346>, 0x6fd99e <ExecInterpExpr+6385>,
0x6fcfa7 <ExecInterpExpr+3834>, 0x6fda1a <ExecInterpExpr+6509>,
0x6fda41 <ExecInterpExpr+6548>, 0x6fd9c5 <ExecInterpExpr+6424>,
0x6fd9f3 <ExecInterpExpr+6470>, 0x6fda68 <ExecInterpExpr+6587>,
0x6fda8f <ExecInterpExpr+6626>, 0x6fdb2d <ExecInterpExpr+6784>,
0x6fdb54 <ExecInterpExpr+6823>, 0x6fdbf2 <ExecInterpExpr+6981>,
0x6fdc20 <ExecInterpExpr+7027>, 0x6fdc4e <ExecInterpExpr+7073>,
0x6fdc89 <ExecInterpExpr+7132>, 0x6fdd3c <ExecInterpExpr+7311>,
0x6fddca <ExecInterpExpr+7453>, 0x6fde51 <ExecInterpExpr+7588>,
0x6fdede <ExecInterpExpr+7729>, 0x6fdffe <ExecInterpExpr+8017>,
0x6fe0e8 <ExecInterpExpr+8251>, 0x6fe1bc <ExecInterpExpr+8463>,
0x6fe2d9 <ExecInterpExpr+8748>, 0x6fe3c0 <ExecInterpExpr+8979>,
0x6fe491 <ExecInterpExpr+9188>, 0x6fe4bf <ExecInterpExpr+9234>,
0x6fe4ed <ExecInterpExpr+9280>}
#3 0x00000000006fe563 in ExecInterpExprStillValid (state=0x130c100,
econtext=0x130be00, isNull=0x7fff1f9659e7) at execExprInterp.c:1807
No locals.
#4 0x000000000074a22c in ExecEvalExprSwitchContext (state=0x130c100,
econtext=0x130be00, isNull=0x7fff1f9659e7) at
../../../src/include/executor/executor.h:313
retDatum = 18446462598752812812
oldContext = 0x130b990
#5 0x000000000074a295 in ExecProject (projInfo=0x130c0f8) at
../../../src/include/executor/executor.h:347
econtext = 0x130be00
state = 0x130c100
slot = 0x130c008
isnull = false
#6 0x000000000074a47b in ExecResult (pstate=0x130bce8) at nodeResult.c:136
node = 0x130bce8
outerTupleSlot = 0x779642 <pq_endmessage_reuse+54>
outerPlan = 0x0
econtext = 0x130be00
#7 0x0000000000712656 in ExecProcNodeFirst (node=0x130bce8) at
execProcnode.c:444
No locals.
#8 0x0000000000707085 in ExecProcNode (node=0x130bce8) at
../../../src/include/executor/executor.h:245
No locals.
#9 0x0000000000709b39 in ExecutePlan (estate=0x130bab0, planstate=0x130bce8,
use_parallel_mode=false, operation=CMD_SELECT, sendTuples=true, numberTuples=0,
direction=ForwardScanDirection, dest=0x12b30c0, execute_once=true) at
execMain.c:1646
slot = 0x0
current_tuple_count = 0
#10 0x00000000007076a9 in standard_ExecutorRun (queryDesc=0x12ae280,
direction=ForwardScanDirection, count=0, execute_once=true) at execMain.c:364
estate = 0x130bab0
operation = CMD_SELECT
dest = 0x12b30c0
sendTuples = true
oldcontext = 0x12ae160
__func__ = "standard_ExecutorRun"
#11 0x00000000007074d1 in ExecutorRun (queryDesc=0x12ae280,
direction=ForwardScanDirection, count=0, execute_once=true) at execMain.c:308
No locals.
#12 0x0000000000921d77 in PortalRunSelect (portal=0x12f3e70, forward=true,
count=0, dest=0x12b30c0) at pquery.c:912
queryDesc = 0x12ae280
direction = ForwardScanDirection
nprocessed = 0
__func__ = "PortalRunSelect"
#13 0x0000000000921a30 in PortalRun (portal=0x12f3e70,
count=9223372036854775807, isTopLevel=true, run_once=true, dest=0x12b30c0,
altdest=0x12b30c0, qc=0x7fff1f965d60)
at pquery.c:756
_save_exception_stack = 0x7fff1f965e70
_save_context_stack = 0x0
_local_sigjmp_buf = {{__jmpbuf = {0, 60194379429867500, 4706656,
140733723337632, 0, 0, 60194379352272876, -59702997874741268}, __mask_was_saved
= 0,
__saved_mask = {__val = {128, 19455040, 19587424, 11183620, 3048,
19587840, 19602576, 140733723335904, 11354916, 19884976, 112, 19607856, 112,
529947888,
19607744, 19455040}}}}
_do_rethrow = false
result = false
nprocessed = 19607856
saveTopTransactionResourceOwner = 0x12b99f8
saveTopTransactionContext = 0x1336240
saveActivePortal = 0x0
saveResourceOwner = 0x12b99f8
savePortalContext = 0x0
saveMemoryContext = 0x1336240
__func__ = "PortalRun"
#14 0x000000000091bc7d in exec_simple_query (query_string=0x128dd60 "select
currtid(37534::oid, '(0,156)'::tid) >= '(1,158)'::tid;") at postgres.c:1239
snapshot_set = true
per_parsetree_context = 0x0
plantree_list = 0x12b3068
parsetree = 0x128f020
commandTag = CMDTAG_SELECT
qc = {commandTag = CMDTAG_UNKNOWN, nprocessed = 0}
querytree_list = 0x128f828
portal = 0x12f3e70
receiver = 0x12b30c0
format = 0
parsetree_item__state = {l = 0x128f058, i = 0}
dest = DestRemote
oldcontext = 0x1336240
parsetree_list = 0x128f058
parsetree_item = 0x128f070
save_log_statement_stats = false
was_logged = false
use_implicit_block = false
msec_str =
"G\000\000\000\002\000\000\000C\000\000\000\000\000\000\000`\335(\001\000\000\000\000=\000\000\000\000\000\000"
__func__ = "exec_simple_query"
#15 0x000000000091fc89 in PostgresMain (argc=1, argv=0x12b7f58,
dbname=0x12b7e68 "regression", username=0x12b7e40 "postgres") at postgres.c:4315
query_string = 0x128dd60 "select currtid(37534::oid, '(0,156)'::tid) >=
'(1,158)'::tid;"
firstchar = 81
input_message = {data = 0x128dd60 "select currtid(37534::oid,
'(0,156)'::tid) >= '(1,158)'::tid;", len = 62, maxlen = 1024, cursor = 62}
local_sigjmp_buf = {{__jmpbuf = {0, 60194379484393452, 4706656,
140733723337632, 0, 0, 60194379463421932, -59702968892100628}, __mask_was_saved
= 1,
__saved_mask = {__val = {0, 4629771061636907072, 31142723648,
19460480, 6582955728264977243, 19455040, 11307737, 1024, 19460504,
140733723336512, 11312179,
19460504, 19455040, 34359738367, 19460504, 19460480}}}}
send_ready_for_query = false
disable_idle_in_transaction_timeout = false
__func__ = "PostgresMain"
#16 0x0000000000871991 in BackendRun (port=0x12afdc0) at postmaster.c:4510
av = 0x12b7f58
maxac = 2
ac = 1
i = 1
__func__ = "BackendRun"
#17 0x0000000000871186 in BackendStartup (port=0x12afdc0) at postmaster.c:4202
bn = 0x12aff80
pid = 0
__func__ = "BackendStartup"
#18 0x000000000086d7bd in ServerLoop () at postmaster.c:1727
port = 0x12afdc0
i = 1
rmask = {fds_bits = {64, 0 <repeats 15 times>}}
selres = 1
now = 1586071847
readmask = {fds_bits = {96, 0 <repeats 15 times>}}
nSockets = 7
last_lockfile_recheck_time = 1586071846
last_touch_time = 1586071846
__func__ = "ServerLoop"
#19 0x000000000086d094 in PostmasterMain (argc=3, argv=0x1289aa0) at
postmaster.c:1400
opt = -1
status = 0
userDoption = 0x12aaad0 "data"
listen_addr_saved = true
i = 64
output_config_variable = 0x0
__func__ = "PostmasterMain"
#20 0x000000000077ac69 in main (argc=3, argv=0x1289aa0) at main.c:210
do_check_root = true