This is crashing repeatedly during insert/update immediately after upgrading an
instance to v14, from v13.3.  In case it matters, the cluster was originally
initdb at 13.2.

TRAP: FailedAssertion("_bt_posting_valid(nposting)", File: "nbtdedup.c", Line: 
1062, PID: 28580)
postgres: telsasoft ts 127.0.0.1(52250) 
INSERT(ExceptionalCondition+0x8d)[0x967d1d]
postgres: telsasoft ts 127.0.0.1(52250) INSERT(_bt_swap_posting+0x2cd)[0x507cdd]
postgres: telsasoft ts 127.0.0.1(52250) INSERT[0x509a14]
postgres: telsasoft ts 127.0.0.1(52250) INSERT(_bt_doinsert+0xcb7)[0x50d0b7]
postgres: telsasoft ts 127.0.0.1(52250) INSERT(btinsert+0x52)[0x5130f2]
postgres: telsasoft ts 127.0.0.1(52250) 
INSERT(ExecInsertIndexTuples+0x231)[0x687b81]
postgres: telsasoft ts 127.0.0.1(52250) INSERT[0x6b8718]
postgres: telsasoft ts 127.0.0.1(52250) INSERT[0x6b9297]
postgres: telsasoft ts 127.0.0.1(52250) 
INSERT(standard_ExecutorRun+0x142)[0x688b32]
postgres: telsasoft ts 127.0.0.1(52250) INSERT[0x82da8a]
postgres: telsasoft ts 127.0.0.1(52250) INSERT[0x82e673]
postgres: telsasoft ts 127.0.0.1(52250) INSERT[0x82e936]
postgres: telsasoft ts 127.0.0.1(52250) INSERT(PortalRun+0x2eb)[0x82ec8b]
postgres: telsasoft ts 127.0.0.1(52250) INSERT(PostgresMain+0x1f97)[0x82c777]
postgres: telsasoft ts 127.0.0.1(52250) INSERT[0x48f71a]
postgres: telsasoft ts 127.0.0.1(52250) INSERT(PostmasterMain+0x1138)[0x794c98]
postgres: telsasoft ts 127.0.0.1(52250) INSERT(main+0x6f2)[0x491292]

< 2021-06-27 23:46:43.257 CAT  >DETAIL:  Failed process was running: INSERT 
INTO alarms(...

#3  0x0000000000507cdd in _bt_swap_posting (newitem=newitem@entry=0x2011c00, 
oposting=oposting@entry=0x7f6de58e2a78, postingoff=postingoff@entry=62) at 
nbtdedup.c:1062
        nhtids = <optimized out>
        replacepos = 0x2011dac ""
        nposting = 0x2011c28
        __func__ = "_bt_swap_posting"
#4  0x0000000000509a14 in _bt_insertonpg (rel=rel@entry=0x7f6dfd3cd628, 
itup_key=itup_key@entry=0x2011b40, buf=15, cbuf=cbuf@entry=0, 
stack=stack@entry=0x2011bd8, itup=0x2011c00, itup@entry=0x200d608, itemsz=16, 
    newitemoff=2, postingoff=62, split_only_page=split_only_page@entry=false) 
at nbtinsert.c:1174
        itemid = 0x7f6de58e0e1c
        page = 0x7f6de58e0e00 "\200"
        opaque = 0x7f6de58e2df0
        isleaf = true
        isroot = false
        isrightmost = false
        isonly = false
        oposting = 0x7f6de58e2a78
        origitup = <optimized out>
        nposting = 0x0
        __func__ = "_bt_insertonpg"
#5  0x000000000050d0b7 in _bt_doinsert (rel=rel@entry=0x7f6dfd3cd628, 
itup=itup@entry=0x200d608, checkUnique=checkUnique@entry=UNIQUE_CHECK_NO, 
indexUnchanged=indexUnchanged@entry=false, 
    heapRel=heapRel@entry=0x7f6dfd48ba80) at nbtinsert.c:257
        newitemoff = 0
        is_unique = false
        insertstate = {itup = 0x200d608, itemsz = 16, itup_key = 0x2011b40, buf 
= 15, bounds_valid = true, low = 2, stricthigh = 3, postingoff = 62}
        itup_key = <optimized out>
        checkingunique = <optimized out>
#6  0x00000000005130f2 in btinsert (rel=0x7f6dfd3cd628, values=<optimized out>, 
isnull=<optimized out>, ht_ctid=0x212e250, heapRel=0x7f6dfd48ba80, 
checkUnique=UNIQUE_CHECK_NO, indexUnchanged=false, 
    indexInfo=0x200d2e8) at nbtree.c:199
        result = <optimized out>
        itup = 0x200d608
#7  0x0000000000687b81 in ExecInsertIndexTuples 
(resultRelInfo=resultRelInfo@entry=0x200cd90, slot=slot@entry=0x212e220, 
estate=estate@entry=0x212c6b0, update=update@entry=false, 
noDupErr=noDupErr@entry=false, 
    specConflict=specConflict@entry=0x0, 
arbiterIndexes=arbiterIndexes@entry=0x0) at execIndexing.c:415


(gdb) p *newitem
$2 = {t_tid = {ip_blkid = {bi_hi = 0, bi_lo = 22}, ip_posid = 4}, t_info = 
32784}
(gdb) p *oposting
$3 = {t_tid = {ip_blkid = {bi_hi = 0, bi_lo = 16}, ip_posid = 8333}, t_info = 
41824}

I will save a copy of the data dir and see if reindexing helps.
Let me know if there's anything else I can provide.

-- 
Justin


Reply via email to