On Wed, Dec 22, 2021 at 11:35:56AM +0000, Simon Riggs wrote:
> On Mon, 15 Nov 2021 at 22:45, Alvaro Herrera <alvhe...@alvh.no-ip.org> wrote:
> >
> > On 2021-Nov-15, Alvaro Herrera wrote:
> >
> > > Thanks everyone for the feedback.  I attach a version with the fixes
> > > that were submitted, as well as some additional changes:
> >
> > Attachment failure.
> 
> I rebased this, please check.
> 

Hi,

I found two crashes, actually I found them on the original patch Álvaro
sent on november but just checked that those already exists.

I configured with:

CFLAGS="-ggdb -Og -g3 -fno-omit-frame-pointer" ./configure 
--prefix=/opt/var/pgdg/15/merge --enable-debug --enable-depend --enable-cassert 
--with-llvm --enable-tap-tests --with-pgport=54315

And tested on the regression database.

Attached the SQL files for the crashes and its respective stacktraces.
FWIW, the second crash doesn't appear to be caused by the MERGE patch
but I cannot trigger it other way.


-- 
Jaime Casanova
Director de Servicios Profesionales
SystemGuards - Consultores de PostgreSQL

Attachment: merge1.sql
Description: application/sql

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
        set = {__val = {4194304, 140726414547632, 2, 6, 5309120, 
94249822928768, 4611686018427388799, 140446649031334, 0, 281470681751456, 0, 0, 
0, 0, 0, 0}}
        pid = <optimized out>
        tid = <optimized out>
        ret = <optimized out>
#1  0x00007fbc4867c535 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, 140446646788085, 2, 4062868317402242624, 
7017002064575424051, 94249829619760, 
              7003715557358071819, 674, 12862997737215894016, 140726414547872, 
140726414547888, 140726414548720}}, sa_flags = 22, sa_restorer = 0x7ffd6bf31bb0}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x000055b83f88c8b5 in ExceptionalCondition 
(conditionName=conditionName@entry=0x55b83f9d61c8 "resultnum >= 0 && resultnum 
< resultslot->tts_tupleDescriptor->natts", 
    errorType=errorType@entry=0x55b83f8e700b "FailedAssertion", 
fileName=fileName@entry=0x55b83f9d5830 "execExprInterp.c", 
lineNumber=lineNumber@entry=674) at assert.c:69
No locals.
#3  0x000055b83f58ea5f in ExecInterpExpr (state=0x55b840b0ac18, 
econtext=0x55b840b0aa10, isnull=0x7ffd6bf31fff) at execExprInterp.c:674
        resultnum = <optimized out>
        op = 0x55b840b0adb0
        resultslot = 0x55b840b0ab40
        innerslot = 0x55b840b08660
        outerslot = 0x0
        scanslot = 0x0
        dispatch_table = {0x55b83f58e5c4 <ExecInterpExpr+88>, 0x55b83f58e5e4 
<ExecInterpExpr+120>, 0x55b83f58e616 <ExecInterpExpr+170>, 0x55b83f58e648 
<ExecInterpExpr+220>, 0x55b83f58e67a <ExecInterpExpr+270>, 
          0x55b83f58e6db <ExecInterpExpr+367>, 0x55b83f58e73c 
<ExecInterpExpr+464>, 0x55b83f58e79d <ExecInterpExpr+561>, 0x55b83f58e7bc 
<ExecInterpExpr+592>, 0x55b83f58e7db <ExecInterpExpr+623>, 
          0x55b83f58e7fa <ExecInterpExpr+654>, 0x55b83f58e815 
<ExecInterpExpr+681>, 0x55b83f58e8b7 <ExecInterpExpr+843>, 0x55b83f58e959 
<ExecInterpExpr+1005>, 0x55b83f58e9fb <ExecInterpExpr+1167>, 
          0x55b83f58ea5f <ExecInterpExpr+1267>, 0x55b83f58eaeb 
<ExecInterpExpr+1407>, 0x55b83f58eb0c <ExecInterpExpr+1440>, 0x55b83f58eb39 
<ExecInterpExpr+1485>, 0x55b83f58eb92 <ExecInterpExpr+1574>, 
          0x55b83f58ebad <ExecInterpExpr+1601>, 0x55b83f58ebc8 
<ExecInterpExpr+1628>, 0x55b83f58ebcf <ExecInterpExpr+1635>, 0x55b83f58ec16 
<ExecInterpExpr+1706>, 0x55b83f58ec4c <ExecInterpExpr+1760>, 
          0x55b83f58ec53 <ExecInterpExpr+1767>, 0x55b83f58ec9a 
<ExecInterpExpr+1838>, 0x55b83f58ecd0 <ExecInterpExpr+1892>, 0x55b83f58ecf5 
<ExecInterpExpr+1929>, 0x55b83f58ed43 <ExecInterpExpr+2007>, 
          0x55b83f58ed64 <ExecInterpExpr+2040>, 0x55b83f58ed9a 
<ExecInterpExpr+2094>, 0x55b83f58edd0 <ExecInterpExpr+2148>, 0x55b83f58ee10 
<ExecInterpExpr+2212>, 0x55b83f58ee3f <ExecInterpExpr+2259>, 
          0x55b83f58ee6e <ExecInterpExpr+2306>, 0x55b83f58ee89 
<ExecInterpExpr+2333>, 0x55b83f58eea4 <ExecInterpExpr+2360>, 0x55b83f58eecb 
<ExecInterpExpr+2399>, 0x55b83f58ef0d <ExecInterpExpr+2465>, 
          0x55b83f58ef4f <ExecInterpExpr+2531>, 0x55b83f58ef76 
<ExecInterpExpr+2570>, 0x55b83f58ef91 <ExecInterpExpr+2597>, 0x55b83f58efac 
<ExecInterpExpr+2624>, 0x55b83f58efc5 <ExecInterpExpr+2649>, 
          0x55b83f58f053 <ExecInterpExpr+2791>, 0x55b83f58f08b 
<ExecInterpExpr+2847>, 0x55b83f58f1c9 <ExecInterpExpr+3165>, 0x55b83f58f24a 
<ExecInterpExpr+3294>, 0x55b83f58f2ba <ExecInterpExpr+3406>, 
          0x55b83f58f323 <ExecInterpExpr+3511>, 0x55b83f58f33a 
<ExecInterpExpr+3534>, 0x55b83f58f345 <ExecInterpExpr+3545>, 0x55b83f58f35c 
<ExecInterpExpr+3568>, 0x55b83f58f373 <ExecInterpExpr+3591>, 
          0x55b83f58f38e <ExecInterpExpr+3618>, 0x55b83f58f3a5 
<ExecInterpExpr+3641>, 0x55b83f58f467 <ExecInterpExpr+3835>, 0x55b83f58f511 
<ExecInterpExpr+4005>, 0x55b83f58f528 <ExecInterpExpr+4028>, 
          0x55b83f58f540 <ExecInterpExpr+4052>, 0x55b83f58f558 
<ExecInterpExpr+4076>, 0x55b83f58f570 <ExecInterpExpr+4100>, 0x55b83f58f5a8 
<ExecInterpExpr+4156>, 0x55b83f58f5aa <ExecInterpExpr+4158>, 
          0x55b83f58f5aa <ExecInterpExpr+4158>, 0x55b83f58f00c 
<ExecInterpExpr+2720>, 0x55b83f58f604 <ExecInterpExpr+4248>, 0x55b83f58f618 
<ExecInterpExpr+4268>, 0x55b83f58f5c0 <ExecInterpExpr+4180>, 
          0x55b83f58f5d8 <ExecInterpExpr+4204>, 0x55b83f58f5ec 
<ExecInterpExpr+4224>, 0x55b83f58f62c <ExecInterpExpr+4288>, 0x55b83f58f643 
<ExecInterpExpr+4311>, 0x55b83f58f69d <ExecInterpExpr+4401>, 
          0x55b83f58f6b4 <ExecInterpExpr+4424>, 0x55b83f58f715 
<ExecInterpExpr+4521>, 0x55b83f58f730 <ExecInterpExpr+4548>, 0x55b83f58f75b 
<ExecInterpExpr+4591>, 0x55b83f58f7d9 <ExecInterpExpr+4717>, 
          0x55b83f58f829 <ExecInterpExpr+4797>, 0x55b83f58f874 
<ExecInterpExpr+4872>, 0x55b83f58f8e4 <ExecInterpExpr+4984>, 0x55b83f58f9f6 
<ExecInterpExpr+5258>, 0x55b83f58faef <ExecInterpExpr+5507>, 
          0x55b83f58fbe1 <ExecInterpExpr+5749>, 0x55b83f58fd30 
<ExecInterpExpr+6084>, 0x55b83f58fe61 <ExecInterpExpr+6389>, 0x55b83f58ff85 
<ExecInterpExpr+6681>, 0x55b83f58ffa0 <ExecInterpExpr+6708>, 
          0x55b83f58ffbb <ExecInterpExpr+6735>}
#4  0x000055b83f58ae18 in ExecInterpExprStillValid (state=0x55b840b0ac18, 
econtext=0x55b840b0aa10, isNull=0x7ffd6bf31fff) at execExprInterp.c:1824
No locals.
#5  0x000055b83f597f7b in ExecEvalExprSwitchContext (isNull=0x7ffd6bf31fff, 
econtext=0x55b840b0aa10, state=0x55b840b0ac18) at 
../../../src/include/executor/executor.h:339
        retDatum = <optimized out>
        oldContext = 0x55b840ad7b40
        retDatum = <optimized out>
        oldContext = <optimized out>
#6  ExecProject (projInfo=0x55b840b0ac10) at 
../../../src/include/executor/executor.h:373
        econtext = 0x55b840b0aa10
        state = 0x55b840b0ac18
        slot = 0x55b840b0ab40
        isnull = false
        econtext = <optimized out>
        state = <optimized out>
        slot = <optimized out>
        isnull = <optimized out>
#7  ExecMergeNotMatched (mtstate=mtstate@entry=0x55b840ad7f08, 
resultRelInfo=resultRelInfo@entry=0x55b840ad8120, 
estate=estate@entry=0x55b840ad7c60, slot=slot@entry=0x55b840b08660) at 
execMerge.c:543
        action = 0x55b840b0abd8
        commandType = <optimized out>
        l__state = <optimized out>
        econtext = <optimized out>
        rootRelInfo = 0x55b840ad8538
        insert_slot = <optimized out>
        actionStates = <optimized out>
        l = <optimized out>
        __func__ = "ExecMergeNotMatched"
#8  0x000055b83f5981d1 in ExecMerge (mtstate=mtstate@entry=0x55b840ad7f08, 
resultRelInfo=0x55b840ad8120, estate=estate@entry=0x55b840ad7c60, 
slot=slot@entry=0x55b840b08660) at execMerge.c:143
        econtext = <optimized out>
        tupleid = <optimized out>
        tuple_ctid = {ip_blkid = {bi_hi = 0, bi_lo = 0}, ip_posid = 0}
        matched = <optimized out>
        datum = <optimized out>
        isNull = <optimized out>
#9  0x000055b83f5c9c03 in ExecModifyTable (pstate=0x55b840ad7f08) at 
nodeModifyTable.c:2579
        datum = <optimized out>
        isNull = <optimized out>
        resultoid = <optimized out>
        node = 0x55b840ad7f08
        estate = 0x55b840ad7c60
        operation = CMD_MERGE
        resultRelInfo = 0x55b840ad8120
        subplanstate = 0x55b840ad8858
        slot = 0x55b840b08660
        planSlot = 0x55b840b08660
        oldSlot = <optimized out>
        tupleid = <optimized out>
        tuple_ctid = {ip_blkid = {bi_hi = 16558, bi_lo = 21944}, ip_posid = 0}
        oldtupdata = {t_len = 1811095808, t_self = {ip_blkid = {bi_hi = 32765, 
bi_lo = 0}, ip_posid = 15546}, t_tableOid = 21944, t_data = 0x2}
        oldtuple = <optimized out>
        proute = 0x55b840b0b558
        relinfos = 0x0
        lc = <optimized out>
        __func__ = "ExecModifyTable"
#10 0x000055b83f59cbf7 in ExecProcNodeFirst (node=0x55b840ad7f08) at 
execProcnode.c:463
No locals.
#11 0x000055b83f593a74 in ExecProcNode (node=0x55b840ad7f08) at 
../../../src/include/executor/executor.h:257
No locals.
#12 ExecutePlan (estate=estate@entry=0x55b840ad7c60, planstate=0x55b840ad7f08, 
use_parallel_mode=<optimized out>, operation=operation@entry=CMD_MERGE, 
sendTuples=sendTuples@entry=false, 
    numberTuples=numberTuples@entry=0, direction=ForwardScanDirection, 
dest=0x55b840aed730, execute_once=true) at execMain.c:1555
        slot = <optimized out>
        current_tuple_count = 0
#13 0x000055b83f594715 in standard_ExecutorRun (queryDesc=0x55b840ac84c0, 
direction=ForwardScanDirection, count=0, execute_once=execute_once@entry=true) 
at execMain.c:362
        estate = 0x55b840ad7c60
        operation = CMD_MERGE
        dest = 0x55b840aed730
        sendTuples = false
        oldcontext = 0x55b840ac83a0
        __func__ = "standard_ExecutorRun"
#14 0x000055b83f5947de in ExecutorRun 
(queryDesc=queryDesc@entry=0x55b840ac84c0, 
direction=direction@entry=ForwardScanDirection, count=count@entry=0, 
execute_once=execute_once@entry=true) at execMain.c:306
No locals.
#15 0x000055b83f756768 in ProcessQuery (plan=plan@entry=0x55b840aed640, 
sourceText=<optimized out>, params=0x0, queryEnv=0x0, 
dest=dest@entry=0x55b840aed730, qc=qc@entry=0x7ffd6bf324a0) at pquery.c:160
        queryDesc = 0x55b840ac84c0
#16 0x000055b83f757382 in PortalRunMulti (portal=portal@entry=0x55b840a66520, 
isTopLevel=isTopLevel@entry=true, setHoldSnapshot=setHoldSnapshot@entry=false, 
dest=dest@entry=0x55b840aed730, 
    altdest=altdest@entry=0x55b840aed730, qc=qc@entry=0x7ffd6bf324a0) at 
pquery.c:1277
        pstmt = 0x55b840aed640
        stmtlist_item__state = <optimized out>
        active_snapshot_set = true
        stmtlist_item = 0x55b840aed6f0
#17 0x000055b83f757914 in PortalRun (portal=portal@entry=0x55b840a66520, 
count=count@entry=9223372036854775807, isTopLevel=isTopLevel@entry=true, 
run_once=run_once@entry=true, dest=dest@entry=0x55b840aed730, 
    altdest=altdest@entry=0x55b840aed730, qc=0x7ffd6bf324a0) at pquery.c:791
        _save_exception_stack = 0x7ffd6bf32540
        _save_context_stack = 0x0
        _local_sigjmp_buf = {{__jmpbuf = {0, 6828001597788628319, 
94249846583488, 94249846990112, 94249846990112, 94249847543600, 
6828001597962691935, 741763848760436063}, __mask_was_saved = 0, __saved_mask = {
              __val = {94249847001696, 140726414549968, 94249846998320, 
94249830163381, 112, 94249846583488, 94249846577040, 0, 162, 140726414550032, 
94249828466653, 1, 2, 94249846583488, 94249846990112, 
                140726414550064}}}}
        _do_rethrow = <optimized out>
        result = <optimized out>
        nprocessed = <optimized out>
        saveTopTransactionResourceOwner = 0x55b840a7cdf0
        saveTopTransactionContext = 0x55b840a889b0
        saveActivePortal = 0x0
        saveResourceOwner = 0x55b840a7cdf0
        savePortalContext = 0x0
        saveMemoryContext = 0x55b840a889b0
        __func__ = "PortalRun"
#18 0x000055b83f7539ef in exec_simple_query (
    query_string=query_string@entry=0x55b840a018b0 "MERGE INTO public.idxpart3 
as target_0\nUSING public.rtest_view2 as ref_0\nON target_0.a = ref_0.a \nWHEN 
NOT MATCHED AND (pg_catalog.lastval() = cast(null as int2)) or (true) \n   THEN 
INSERT VALUES ( 20"...) at postgres.c:1215
        snapshot_set = <optimized out>
        per_parsetree_context = 0x0
        plantree_list = 0x55b840aed6d8
        parsetree = 0x55b840a030c0
        commandTag = <optimized out>
        qc = {commandTag = CMDTAG_UNKNOWN, nprocessed = 0}
        querytree_list = <optimized out>
        portal = 0x55b840a66520
        receiver = 0x55b840aed730
        format = 0
        parsetree_item__state = <optimized out>
        dest = DestRemote
        oldcontext = 0x55b840a889b0
        parsetree_list = 0x55b840a030f8
        parsetree_item = 0x55b840a03110
        save_log_statement_stats = false
        was_logged = false
        use_implicit_block = false
        msec_str = 
"\200\177\242@\270U\000\000\b\000\000\000\000\000\000\000\340$\363k\375\177\000\000?\"\212?\270U\000"
        __func__ = "exec_simple_query"
#19 0x000055b83f75594c in PostgresMain (dbname=<optimized out>, 
username=<optimized out>) at postgres.c:4498
        query_string = 0x55b840a018b0 "MERGE INTO public.idxpart3 as 
target_0\nUSING public.rtest_view2 as ref_0\nON target_0.a = ref_0.a \nWHEN NOT 
MATCHED AND (pg_catalog.lastval() = cast(null as int2)) or (true) \n   THEN 
INSERT VALUES ( 20"...
        firstchar = <optimized out>
        input_message = {
          data = 0x55b840a018b0 "MERGE INTO public.idxpart3 as target_0\nUSING 
public.rtest_view2 as ref_0\nON target_0.a = ref_0.a \nWHEN NOT MATCHED AND 
(pg_catalog.lastval() = cast(null as int2)) or (true) \n   THEN INSERT VALUES ( 
20"..., len = 203, maxlen = 1024, cursor = 203}
        local_sigjmp_buf = {{__jmpbuf = {140726414550304, 6828001597845251423, 
1121585057, 94249846734720, 8, 94249846734720, 6828001597817988447, 
741763847300162911}, __mask_was_saved = 1, __saved_mask = {
              __val = {4194304, 18446744073709551536, 15616, 94249846734720, 
140446645740515, 0, 94249846550368, 140726414550544, 15616, 15680, 
94249828434542, 0, 94249846550368, 15616, 94249846734720, 8}}}}
        send_ready_for_query = false
        idle_in_transaction_timeout_enabled = false
        idle_session_timeout_enabled = false
        __func__ = "PostgresMain"
#20 0x000055b83f6b1014 in BackendRun (port=port@entry=0x55b840a27f80) at 
postmaster.c:4594
No locals.
#21 0x000055b83f6b41b6 in BackendStartup (port=port@entry=0x55b840a27f80) at 
postmaster.c:4322
        bn = 0x55b840a25cf0
        pid = 0
        __func__ = "BackendStartup"
#22 0x000055b83f6b43d1 in ServerLoop () at postmaster.c:1802
        port = 0x55b840a27f80
        i = 2
        rmask = {fds_bits = {128, 0 <repeats 15 times>}}
        selres = <optimized out>
        now = <optimized out>
        readmask = {fds_bits = {224, 0 <repeats 15 times>}}
        nSockets = 8
        last_lockfile_recheck_time = 1641966476
        last_touch_time = 1641966295
        __func__ = "ServerLoop"
#23 0x000055b83f6b5971 in PostmasterMain (argc=3, argv=<optimized out>) at 
postmaster.c:1474
        opt = <optimized out>
        status = <optimized out>
        userDoption = <optimized out>
        listen_addr_saved = true
        i = <optimized out>
        output_config_variable = <optimized out>
        __func__ = "PostmasterMain"
#24 0x000055b83f5f429b in main (argc=3, argv=0x55b8409faec0) at main.c:198
No locals.

Attachment: merge2.sql
Description: application/sql

#0  pg_detoast_datum_packed (datum=0x0) at fmgr.c:1756
No locals.
#1  0x000055b83f8609e3 in bpcharcmp (fcinfo=0x7ffd6bf31c40) at varchar.c:905
        arg1 = 0x55b840a95130
        arg2 = <optimized out>
        len1 = <optimized out>
        len2 = <optimized out>
        cmp = <optimized out>
#2  0x000055b83f895893 in FunctionCall2Coll 
(flinfo=flinfo@entry=0x55b840ad2338, collation=<optimized out>, arg1=<optimized 
out>, arg2=arg2@entry=0) at fmgr.c:1160
        fcinfodata = {fcinfo = {flinfo = 0x55b840ad2338, context = 0x0, 
resultinfo = 0x0, fncollation = 100, isnull = false, nargs = 2, args = 
0x7ffd6bf31c60}, 
          fcinfo_data = "8#\255@\270U", '\000' <repeats 18 times>, 
"d\000\000\000\000U\002\000\060Q\251@\270U\000\000\000u`?\270U", '\000' 
<repeats 11 times>, "\004\260@\270U\000"}
        fcinfo = 0x7ffd6bf31c40
        result = <optimized out>
        __func__ = "FunctionCall2Coll"
#3  0x000055b83f698fca in partition_list_bsearch (partsupfunc=0x55b840ad2338, 
partcollation=0x55b840ad2390, boundinfo=boundinfo@entry=0x55b840a95098, 
value=0, is_equal=is_equal@entry=0x7ffd6bf31d0f)
    at partbounds.c:3638
        cmpval = <optimized out>
        lo = -1
        hi = 0
        mid = 0
#4  0x000055b83f59a6f6 in get_partition_for_tuple (pd=pd@entry=0x55b840b1a4d8, 
values=values@entry=0x7ffd6bf31db0, isnull=isnull@entry=0x7ffd6bf31d90) at 
execPartition.c:1372
        equal = false
        bound_offset = <optimized out>
        part_index = -1
        key = 0x55b840ad2240
        partdesc = <optimized out>
        boundinfo = 0x55b840a95098
        __func__ = "get_partition_for_tuple"
#5  0x000055b83f59bef5 in ExecFindPartition 
(mtstate=mtstate@entry=0x55b840affaa8, 
rootResultRelInfo=rootResultRelInfo@entry=0x55b840affed8, 
proute=0x55b840b1a448, slot=slot@entry=0x55b840b1a3b0, 
    estate=estate@entry=0x55b840aff800) at execPartition.c:314
        partidx = -1
        is_leaf = <optimized out>
        pd = 0x55b840b1a530
        values = {0, 94249823350511, 94249847625024, 94249847666560, 
140726414548480, 15, 94249847729120, 94249847729116, 94249847692344, 
94249847692304, 94249847691184, 21474836511, 16, 94249847729119, 
          94249847692344, 4, 94249847624984, 94249847617248, 140446491906016, 
94249847618216, 140726414548608, 94249828466970, 94249847729119, 2, 
94249847624984, 5, 140726414548640, 94249822988364, 
          94249847618752, 140446491906016, 140726414548752, 94249822989220}
        isnull = {false, 29, 243, 107, 253, 127, false, false, 67, 32, 90, 63, 
184, 85, false, false, 88, 22, 176, 64, 184, 85, false, false, 8, 172, 177, 64, 
184, 85, false, false}
        rel = 0x7fbc3f419f78
        dispatch = 0x55b840b1a4d8
        partdesc = 0x55b840a95060
        ecxt = 0x55b840b1b158
        ecxt_scantuple_saved = 0x0
        rootslot = 0x55b840b1a3b0
        myslot = 0x0
        oldcxt = 0x55b840aff6e0
        rri = 0x0
        __func__ = "ExecFindPartition"
#6  0x000055b83f5c7f2d in ExecPrepareTupleRouting 
(mtstate=mtstate@entry=0x55b840affaa8, estate=estate@entry=0x55b840aff800, 
proute=<optimized out>, targetRelInfo=targetRelInfo@entry=0x55b840affed8, 
    slot=slot@entry=0x55b840b1a3b0, 
partRelInfo=partRelInfo@entry=0x7ffd6bf31f58) at nodeModifyTable.c:2426
        partrel = <optimized out>
        map = <optimized out>
#7  0x000055b83f5c7ffc in ExecInsert (mtstate=mtstate@entry=0x55b840affaa8, 
resultRelInfo=resultRelInfo@entry=0x55b840affed8, 
slot=slot@entry=0x55b840b1a3b0, planSlot=planSlot@entry=0x55b840b15400, 
    estate=estate@entry=0x55b840aff800, 
actionState=actionState@entry=0x55b840b19a70, canSetTag=true) at 
nodeModifyTable.c:614
        partRelInfo = 0x55b840affcc0
        resultRelationDesc = <optimized out>
        recheckIndexes = 0x0
        result = 0x0
        ar_insert_trig_tcs = <optimized out>
        node = <optimized out>
        onconflict = ONCONFLICT_NONE
        proute = <optimized out>
        oldContext = <optimized out>
#8  0x000055b83f597fdc in ExecMergeNotMatched 
(mtstate=mtstate@entry=0x55b840affaa8, resultRelInfo=0x55b840affed8, 
resultRelInfo@entry=0x55b840affcc0, estate=estate@entry=0x55b840aff800, 
    slot=slot@entry=0x55b840b15400) at execMerge.c:571
        action = 0x55b840b19a70
        commandType = <optimized out>
        l__state = <optimized out>
        econtext = <optimized out>
        rootRelInfo = 0x55b840affed8
        insert_slot = 0x55b840b1a3b0
        actionStates = <optimized out>
        l = <optimized out>
        __func__ = "ExecMergeNotMatched"
#9  0x000055b83f5981d1 in ExecMerge (mtstate=mtstate@entry=0x55b840affaa8, 
resultRelInfo=0x55b840affcc0, estate=estate@entry=0x55b840aff800, 
slot=slot@entry=0x55b840b15400) at execMerge.c:143
        econtext = <optimized out>
        tupleid = <optimized out>
        tuple_ctid = {ip_blkid = {bi_hi = 0, bi_lo = 0}, ip_posid = 0}
        matched = <optimized out>
        datum = <optimized out>
        isNull = <optimized out>
#10 0x000055b83f5c9c03 in ExecModifyTable (pstate=0x55b840affaa8) at 
nodeModifyTable.c:2579
        datum = <optimized out>
        isNull = <optimized out>
        resultoid = <optimized out>
        node = 0x55b840affaa8
        estate = 0x55b840aff800
        operation = CMD_MERGE
        resultRelInfo = 0x55b840affcc0
        subplanstate = 0x55b840b001f8
        slot = 0x55b840b15400
        planSlot = 0x55b840b15400
        oldSlot = <optimized out>
        tupleid = <optimized out>
        tuple_ctid = {ip_blkid = {bi_hi = 16559, bi_lo = 21944}, ip_posid = 0}
        oldtupdata = {t_len = 1811095808, t_self = {ip_blkid = {bi_hi = 32765, 
bi_lo = 0}, ip_posid = 15546}, t_tableOid = 21944, t_data = 0x7ffd6bf32100}
        oldtuple = <optimized out>
        proute = 0x55b840b1a448
        relinfos = 0x0
        lc = <optimized out>
        __func__ = "ExecModifyTable"
#11 0x000055b83f59cbf7 in ExecProcNodeFirst (node=0x55b840affaa8) at 
execProcnode.c:463
No locals.
#12 0x000055b83f593a74 in ExecProcNode (node=0x55b840affaa8) at 
../../../src/include/executor/executor.h:257
No locals.
#13 ExecutePlan (estate=estate@entry=0x55b840aff800, planstate=0x55b840affaa8, 
use_parallel_mode=<optimized out>, operation=operation@entry=CMD_MERGE, 
sendTuples=sendTuples@entry=false, 
    numberTuples=numberTuples@entry=0, direction=ForwardScanDirection, 
dest=0x7fbc3f3e8348, execute_once=true) at execMain.c:1555
        slot = <optimized out>
        current_tuple_count = 0
#14 0x000055b83f594715 in standard_ExecutorRun (queryDesc=0x55b840aeb840, 
direction=ForwardScanDirection, count=0, execute_once=execute_once@entry=true) 
at execMain.c:362
        estate = 0x55b840aff800
        operation = CMD_MERGE
        dest = 0x7fbc3f3e8348
        sendTuples = false
        oldcontext = 0x55b840aeb720
        __func__ = "standard_ExecutorRun"
#15 0x000055b83f5947de in ExecutorRun 
(queryDesc=queryDesc@entry=0x55b840aeb840, 
direction=direction@entry=ForwardScanDirection, count=count@entry=0, 
execute_once=execute_once@entry=true) at execMain.c:306
No locals.
#16 0x000055b83f756768 in ProcessQuery (plan=plan@entry=0x7fbc3f3e69a8, 
sourceText=<optimized out>, params=0x0, queryEnv=0x0, 
dest=dest@entry=0x7fbc3f3e8348, qc=qc@entry=0x7ffd6bf324a0) at pquery.c:160
        queryDesc = 0x55b840aeb840
#17 0x000055b83f757382 in PortalRunMulti (portal=portal@entry=0x55b840a6c8a0, 
isTopLevel=isTopLevel@entry=true, setHoldSnapshot=setHoldSnapshot@entry=false, 
dest=dest@entry=0x7fbc3f3e8348, 
    altdest=altdest@entry=0x7fbc3f3e8348, qc=qc@entry=0x7ffd6bf324a0) at 
pquery.c:1277
        pstmt = 0x7fbc3f3e69a8
        stmtlist_item__state = <optimized out>
        active_snapshot_set = true
        stmtlist_item = 0x7fbc3f3e8308
#18 0x000055b83f757914 in PortalRun (portal=portal@entry=0x55b840a6c8a0, 
count=count@entry=9223372036854775807, isTopLevel=isTopLevel@entry=true, 
run_once=run_once@entry=true, dest=dest@entry=0x7fbc3f3e8348, 
    altdest=altdest@entry=0x7fbc3f3e8348, qc=0x7ffd6bf324a0) at pquery.c:791
        _save_exception_stack = 0x7ffd6bf32540
        _save_context_stack = 0x0
        _local_sigjmp_buf = {{__jmpbuf = {0, 6828001597788628319, 
94249846584752, 94249847015584, 94249847015584, 140446491640648, 
6828001597962691935, 741763848760436063}, __mask_was_saved = 0, 
            __saved_mask = {__val = {94249847027168, 140726414549968, 
94249847023792, 94249830163381, 112, 94249846584752, 94249846577040, 0, 162, 
140726414550032, 94249828466653, 1, 2, 94249846584752, 
                94249847015584, 140726414550064}}}}
        _do_rethrow = <optimized out>
        result = <optimized out>
        nprocessed = <optimized out>
        saveTopTransactionResourceOwner = 0x55b840a32110
        saveTopTransactionContext = 0x55b840a843c0
        saveActivePortal = 0x0
        saveResourceOwner = 0x55b840a32110
        savePortalContext = 0x0
        saveMemoryContext = 0x55b840a843c0
        __func__ = "PortalRun"
#19 0x000055b83f7539ef in exec_simple_query (
    query_string=query_string@entry=0x55b840a018b0 "MERGE INTO public.part_7 as 
target_0\nUSING public.tenk1 as ref_0\n  left join public.num_exp_ln as 
sample_0 \n  on (ref_0.twenty = sample_0.id )\nON target_0.a = sample_0.id 
\nWHEN MATCHED AND 41 is NULL\n"...) at postgres.c:1215
        snapshot_set = <optimized out>
        per_parsetree_context = 0x0
        plantree_list = 0x7fbc3f3e82f0
        parsetree = 0x55b840a035b0
        commandTag = <optimized out>
        qc = {commandTag = CMDTAG_UNKNOWN, nprocessed = 0}
        querytree_list = <optimized out>
        portal = 0x55b840a6c8a0
        receiver = 0x7fbc3f3e8348
        format = 0
        parsetree_item__state = <optimized out>
        dest = DestRemote
        oldcontext = 0x55b840a843c0
        parsetree_list = 0x55b840a035e8
        parsetree_item = 0x55b840a03600
        save_log_statement_stats = false
        was_logged = false
        use_implicit_block = false
        msec_str = 
"\220\203\242@\270U\000\000\b\000\000\000\000\000\000\000\340$\363k\375\177\000\000?\"\212?\270U\000"
        __func__ = "exec_simple_query"
#20 0x000055b83f75594c in PostgresMain (dbname=<optimized out>, 
username=<optimized out>) at postgres.c:4498
        query_string = 0x55b840a018b0 "MERGE INTO public.part_7 as 
target_0\nUSING public.tenk1 as ref_0\n  left join public.num_exp_ln as 
sample_0 \n  on (ref_0.twenty = sample_0.id )\nON target_0.a = sample_0.id 
\nWHEN MATCHED AND 41 is NULL\n"...
        firstchar = <optimized out>
        input_message = {
          data = 0x55b840a018b0 "MERGE INTO public.part_7 as target_0\nUSING 
public.tenk1 as ref_0\n  left join public.num_exp_ln as sample_0 \n  on 
(ref_0.twenty = sample_0.id )\nON target_0.a = sample_0.id \nWHEN MATCHED AND 
41 is NULL\n"..., len = 309, maxlen = 1024, cursor = 309}
        local_sigjmp_buf = {{__jmpbuf = {140726414550304, 6828001597845251423, 
2478168661, 94249846735760, 8, 94249846735760, 6828001597817988447, 
741763847300162911}, __mask_was_saved = 1, __saved_mask = {
              __val = {4194304, 18446744073709551536, 15616, 94249846735760, 
140446645740515, 0, 94249846550368, 140726414550544, 15616, 15680, 
94249828434542, 0, 94249846550368, 15616, 94249846735760, 8}}}}
        send_ready_for_query = false
        idle_in_transaction_timeout_enabled = false
        idle_session_timeout_enabled = false
        __func__ = "PostgresMain"
#21 0x000055b83f6b1014 in BackendRun (port=port@entry=0x55b840a28390) at 
postmaster.c:4594
No locals.
#22 0x000055b83f6b41b6 in BackendStartup (port=port@entry=0x55b840a28390) at 
postmaster.c:4322
        bn = 0x55b840a25cf0
        pid = 0
        __func__ = "BackendStartup"
#23 0x000055b83f6b43d1 in ServerLoop () at postmaster.c:1802
        port = 0x55b840a28390
        i = 2
        rmask = {fds_bits = {128, 0 <repeats 15 times>}}
        selres = <optimized out>
        now = <optimized out>
        readmask = {fds_bits = {224, 0 <repeats 15 times>}}
        nSockets = 8
        last_lockfile_recheck_time = 1641966712
        last_touch_time = 1641966295
        __func__ = "ServerLoop"
#24 0x000055b83f6b5971 in PostmasterMain (argc=3, argv=<optimized out>) at 
postmaster.c:1474
        opt = <optimized out>
        status = <optimized out>
        userDoption = <optimized out>
        listen_addr_saved = true
        i = <optimized out>
        output_config_variable = <optimized out>
        __func__ = "PostmasterMain"
#25 0x000055b83f5f429b in main (argc=3, argv=0x55b8409faec0) at main.c:198
No locals.

Reply via email to