On Fri, Mar 19, 2021 at 2:44 PM Robert Haas <robertmh...@gmail.com> wrote:
>
> I committed the core patch (0003) with a bit more editing.  Let's see
> what the buildfarm thinks.
>

I think this is bbe0a81db69bd10bd166907c3701492a29aca294, right?
This introduced a new assert failure, steps to reproduce:

"""
create table t1 (col1 text, col2 text);
create unique index on t1 ((col1 || col2));
insert into t1 values((select array_agg(md5(g::text))::text from
generate_series(1, 256) g), version());
"""

Attached is a backtrace from current HEAD

-- 
Jaime Casanova
Director de Servicios Profesionales
SYSTEMGUARDS - Consultores de PostgreSQL
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
        set = {__val = {4194304, 140726735034080, 2, 6, 6515006, 
94155769016304, 4611686018427388799, 140459852548774, 0, 281470681751456, 0, 0, 
0, 0, 0, 0}}
        pid = <optimized out>
        tid = <optimized out>
        ret = <optimized out>
#1  0x00007fbf5b657535 in __GI_abort () at abort.c:79
        save_stage = 1
        act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, 
sa_mask = {__val = {0, 0, 0, 0, 0, 140459850305525, 2, 3630241276386869248, 
7003431909949847861, 94155769016304, 
              7003772758621645568, 0, 1523958137291918592, 140726735034320, 0, 
140726735035184}}, sa_flags = 1495953392, sa_restorer = 0x0}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x000055a25992a983 in ExceptionalCondition (conditionName=0x55a2599a9248 
"CompressionMethodIsValid(cmethod)", errorType=0x55a2599a91d2 
"FailedAssertion", fileName=0x55a2599a91c0 "toast_internals.c", 
    lineNumber=56) at assert.c:69
No locals.
#3  0x000055a2592c0709 in toast_compress_datum (value=94155801611904, cmethod=0 
'\000') at toast_internals.c:56
        tmp = 0x0
        valsize = 1528257472
        cmid = TOAST_INVALID_COMPRESSION_ID
        __func__ = "toast_compress_datum"
#4  0x000055a2592b9532 in index_form_tuple (tupleDescriptor=0x7fbf524881a8, 
values=0x7ffd7f0d5e10, isnull=0x7ffd7f0d5df0) at indextuple.c:106
        cvalue = 140726735035664
        att = 0x7fbf524881c0
        tp = 0x25b19e830 <error: Cannot access memory at address 0x25b19e830>
        tuple = 0x55a25b1a4608
        size = 94155801511432
        data_size = 0
        hoff = 0
        i = 0
        infomask = 0
        hasnull = false
        tupmask = 0
        numberOfAttributes = 1
        untoasted_values = {94155801611904, 94155771761321, 140726735035376, 
94155801506904, 94155779258656, 140726735035488, 94155779258656, 
140726735035488, 0, 140459848948121, 140726735035488, 
          94155779258656, 140726735035520, 0, 140726735035520, 94155769016304, 
94155801611904, 8589934592, 94155801512576, 94155801512544, 94155801511432, 
94155801506904, 94155771775058, 94155801352832, 0, 
          94155779258656, 6426549472, 94155771784441, 94155801487408, 0, 0, 0}
        untoasted_free = {false, false, false, false, false, false, false, 
false, false, 4, false, false, false, false, false, false, 8, 69, 26, 91, 162, 
85, false, false, 192, 91, 23, 91, 162, 85, false, 
          false}
        __func__ = "index_form_tuple"
#5  0x000055a259355563 in btinsert (rel=0x7fbf5248b3f0, values=0x7ffd7f0d5e10, 
isnull=0x7ffd7f0d5df0, ht_ctid=0x55a25b19e860, heapRel=0x7fbf524840a8, 
checkUnique=UNIQUE_CHECK_YES, indexUnchanged=false, 
    indexInfo=0x55a25b17d968) at nbtree.c:196
        result = false
        itup = 0x55a2593eb96d <ReindexIsProcessingIndex+42>
#6  0x000055a259341253 in index_insert (indexRelation=0x7fbf5248b3f0, 
values=0x7ffd7f0d5e10, isnull=0x7ffd7f0d5df0, heap_t_ctid=0x55a25b19e860, 
heapRelation=0x7fbf524840a8, checkUnique=UNIQUE_CHECK_YES, 
    indexUnchanged=false, indexInfo=0x55a25b17d968) at indexam.c:193
        __func__ = "index_insert"
#7  0x000055a259551d6b in ExecInsertIndexTuples (resultRelInfo=0x55a25b17d0a8, 
slot=0x55a25b19e830, estate=0x55a25b175ce0, update=false, noDupErr=false, 
specConflict=0x0, arbiterIndexes=0x0)
    at execIndexing.c:416
        applyNoDupErr = false
        checkUnique = UNIQUE_CHECK_YES
        indexRelation = 0x7fbf5248b3f0
        indexInfo = 0x55a25b17d968
        indexUnchanged = false
        satisfiesConstraint = false
        tupleid = 0x55a25b19e860
        result = 0x0
        i = 0
        numIndices = 1
        relationDescs = 0x55a25b17d900
        heapRelation = 0x7fbf524840a8
        indexInfoArray = 0x55a25b17d920
        econtext = 0x55a25b1a2f88
        values = {94155801611904, 94155801320384, 23002747632, 94155801505976, 
94155801505952, 94155801320384, 140726735036016, 94155776090255, 
94155800974064, 94155801505976, 140726735036048, 94155801320384, 
          140726735036048, 94155769089800, 5801161712, 94155801505976, 
140726735036192, 94155769471556, 0, 0, 94155801603232, 140459695947944, 
140726735036224, 6764221304040416, 1, 23351616, 140459705036672, 
          856226916400, 94155801505976, 2325076142599, 549755813894, 0}
        isnull = {false, true, false, false, false, false, false, false, 184, 
48, 26, 91, 162, 85, false, false, 64, 94, 13, 127, 253, 127, false, false, 
135, 177, 149, 89, 162, 85, false, false}
#8  0x000055a259595abe in ExecInsert (mtstate=0x55a25b17ce70, 
resultRelInfo=0x55a25b17d0a8, slot=0x55a25b19e830, planSlot=0x55a25b19e830, 
estate=0x55a25b175ce0, canSetTag=true) at nodeModifyTable.c:698
        wco_kind = WCO_RLS_INSERT_CHECK
        resultRelationDesc = 0x7fbf524840a8
        recheckIndexes = 0x0
        result = 0x0
        ar_insert_trig_tcs = 0x55a25b17d7e8
        node = 0x55a25b17b040
        onconflict = ONCONFLICT_NONE
        proute = 0x0
        oldContext = 0x55a25b17d7e8
#9  0x000055a259597ef3 in ExecModifyTable (pstate=0x55a25b17ce70) at 
nodeModifyTable.c:2250
        node = 0x55a25b17ce70
        estate = 0x55a25b175ce0
        operation = CMD_INSERT
        resultRelInfo = 0x55a25b17d0a8
        subplanstate = 0x55a25b17d638
        junkfilter = 0x0
        slot = 0x55a25b19e830
        planSlot = 0x55a25b19e830
        tupleid = 0x0
        tuple_ctid = {ip_blkid = {bi_hi = 32525, bi_lo = 32765}, ip_posid = 0}
        oldtupdata = {t_len = 2131583152, t_self = {ip_blkid = {bi_hi = 32765, 
bi_lo = 0}, ip_posid = 62462}, t_tableOid = 21922, t_data = 0x55a25b19f148}
        oldtuple = 0x0
        proute = 0x0
        relinfos = 0x0
        lc = 0xe300000001
        __func__ = "ExecModifyTable"
#10 0x000055a25955f327 in ExecProcNodeFirst (node=0x55a25b17ce70) at 
execProcnode.c:456
No locals.
#11 0x000055a259553757 in ExecProcNode (node=0x55a25b17ce70) at 
../../../src/include/executor/executor.h:247
No locals.
#12 0x000055a2595560b3 in ExecutePlan (estate=0x55a25b175ce0, 
planstate=0x55a25b17ce70, use_parallel_mode=false, operation=CMD_INSERT, 
sendTuples=false, numberTuples=0, direction=ForwardScanDirection, 
    dest=0x55a25b191308, execute_once=true) at execMain.c:1528
        slot = 0x55a25b175ce0
        current_tuple_count = 0
#13 0x000055a259553db8 in standard_ExecutorRun (queryDesc=0x55a25b0c5e00, 
direction=ForwardScanDirection, count=0, execute_once=true) at execMain.c:350
        estate = 0x55a25b175ce0
        operation = CMD_INSERT
        dest = 0x55a25b191308
        sendTuples = false
        oldcontext = 0x55a25b0c5ce0
        __func__ = "standard_ExecutorRun"
#14 0x000055a259553bce in ExecutorRun (queryDesc=0x55a25b0c5e00, 
direction=ForwardScanDirection, count=0, execute_once=true) at execMain.c:294
No locals.
#15 0x000055a25979c5bb in ProcessQuery (plan=0x55a25b191218, 
sourceText=0x55a25b0a28b0 "insert into t1 values((select 
array_agg(md5(g::text))::text from generate_series(1, 256) g), version());", 
params=0x0, 
    queryEnv=0x0, dest=0x55a25b191308, qc=0x7ffd7f0d64d0) at pquery.c:160
        queryDesc = 0x55a25b0c5e00
#16 0x000055a25979df78 in PortalRunMulti (portal=0x55a25b105500, 
isTopLevel=true, setHoldSnapshot=false, dest=0x55a25b191308, 
altdest=0x55a25b191308, qc=0x7ffd7f0d64d0) at pquery.c:1267
        pstmt = 0x55a25b191218
        stmtlist_item__state = {l = 0x55a25b1912b0, i = 0}
        active_snapshot_set = true
        stmtlist_item = 0x55a25b1912c8
#17 0x000055a25979d4fa in PortalRun (portal=0x55a25b105500, 
count=9223372036854775807, isTopLevel=true, run_once=true, dest=0x55a25b191308, 
altdest=0x55a25b191308, qc=0x7ffd7f0d64d0) at pquery.c:779
        _save_exception_stack = 0x7ffd7f0d65e0
        _save_context_stack = 0x0
        _local_sigjmp_buf = {{__jmpbuf = {0, 2545784288364605019, 
94155769016304, 140726735039232, 0, 0, 2545784288404450907, 
8640786708843867739}, __mask_was_saved = 0, __saved_mask = {__val = 
{18682721829, 
                94155801432816, 128, 94155800455056, 94155800868112, 
140726735037488, 27104, 94155775910225, 94155801427152, 140726735037520, 
94155776089324, 13, 112, 94155801432952, 112, 2131584096}}}}
        _do_rethrow = false
        result = false
        nprocessed = 94155801432840
        saveTopTransactionResourceOwner = 0x55a25b0d1160
        saveTopTransactionContext = 0x55a25b121030
        saveActivePortal = 0x0
        saveResourceOwner = 0x55a25b0d1160
        savePortalContext = 0x0
        saveMemoryContext = 0x55a25b121030
        __func__ = "PortalRun"
#18 0x000055a259796e4c in exec_simple_query (query_string=0x55a25b0a28b0 
"insert into t1 values((select array_agg(md5(g::text))::text from 
generate_series(1, 256) g), version());") at postgres.c:1185
        snapshot_set = true
        per_parsetree_context = 0x0
        plantree_list = 0x55a25b1912b0
        parsetree = 0x55a25b0a4278
        commandTag = CMDTAG_INSERT
        qc = {commandTag = CMDTAG_UNKNOWN, nprocessed = 0}
        querytree_list = 0x55a25b185e38
        portal = 0x55a25b105500
        receiver = 0x55a25b191308
        format = 0
        parsetree_item__state = {l = 0x55a25b0a42b0, i = 0}
        dest = DestRemote
        oldcontext = 0x55a25b121030
        parsetree_list = 0x55a25b0a42b0
        parsetree_item = 0x55a25b0a42c8
        save_log_statement_stats = false
        was_logged = false
        use_implicit_block = false
        msec_str = "\260(\n[\242U\000\000h\000\000\000\006\000\000\000 
e\r\177\375\177\000\000\346\275\\Yh\000\000"
        __func__ = "exec_simple_query"
#19 0x000055a25979b575 in PostgresMain (argc=1, argv=0x7ffd7f0d6760, 
dbname=0x55a25b0cf400 "postgres", username=0x55a25b0cf3d8 "jcasanov") at 
postgres.c:4415
        query_string = 0x55a25b0a28b0 "insert into t1 values((select 
array_agg(md5(g::text))::text from generate_series(1, 256) g), version());"
        firstchar = 81
        input_message = {data = 0x55a25b0a28b0 "insert into t1 values((select 
array_agg(md5(g::text))::text from generate_series(1, 256) g), version());", 
len = 105, maxlen = 1024, cursor = 105}
        local_sigjmp_buf = {{__jmpbuf = {0, 2545784288270233179, 
94155769016304, 140726735039232, 0, 0, 2545784288333147739, 
8640786712131677787}, __mask_was_saved = 1, __saved_mask = {__val = {4194304, 
0, 0, 
                0, 0, 0, 0, 0, 0, 0, 1099511627520, 0, 0, 4294901760, 
18446462598732840960, 0}}}}
        send_ready_for_query = false
        idle_in_transaction_timeout_enabled = false
        idle_session_timeout_enabled = false
        __func__ = "PostgresMain"
#20 0x000055a2596d6288 in BackendRun (port=0x55a25b0c6b10) at postmaster.c:4470
        av = {0x55a259ad061f "postgres", 0x0}
        ac = 1
#21 0x000055a2596d5bb7 in BackendStartup (port=0x55a25b0c6b10) at 
postmaster.c:4192
        bn = 0x55a25b0c6cd0
        pid = 0
        __func__ = "BackendStartup"
#22 0x000055a2596d2029 in ServerLoop () at postmaster.c:1737
        port = 0x55a25b0c6b10
        i = 2
        rmask = {fds_bits = {128, 0 <repeats 15 times>}}
        selres = 1
        now = 1616571731
        readmask = {fds_bits = {224, 0 <repeats 15 times>}}
        nSockets = 8
        last_lockfile_recheck_time = 1616571731
        last_touch_time = 1616571731
        __func__ = "ServerLoop"
#23 0x000055a2596d1878 in PostmasterMain (argc=3, argv=0x55a25b09bec0) at 
postmaster.c:1409
        opt = -1
        status = 0
        userDoption = 0x55a25b0bf7b0 "data"
        listen_addr_saved = true
        i = 64
        output_config_variable = 0x0
        __func__ = "PostmasterMain"
#24 0x000055a2595cef3d in main (argc=3, argv=0x55a25b09bec0) at main.c:209
        do_check_root = true

Reply via email to