Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n7Wsj-0002ju-Rh for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Jan 2022 06:13:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n7Wsi-0008VH-Cy for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Jan 2022 06:13:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n7Wsh-0008V8-Mr for pgsql-hackers@lists.postgresql.org; Wed, 12 Jan 2022 06:13:12 +0000 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n7Wsa-0006a6-4G for pgsql-hackers@lists.postgresql.org; Wed, 12 Jan 2022 06:13:10 +0000 Received: by mail-qt1-x82d.google.com with SMTP id g21so1792793qtk.4 for ; Tue, 11 Jan 2022 22:13:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=systemguards-com-ec.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=FX2GofpeiQkFfaPg/yi7edLinY/+dfIwrzG4QA855os=; b=mqdF95BbKGRfvVyV7rRy9S8c1LIdEm1yzAUVv2pWKtezTJbOzCq/tAlFQkSm0eIoDf 9670KBw/qAWkquOwLADuUCFghi4C596Fl+szKB8qBAiYn8UTojy96402CqenePDJzrqU yTTNHZLo3DiwANiB5lUzl0hG6jJ7iUp+p36iTivH5gm9F/IvI4lKDur/nSyu2ZKKmTci AcS3K3AI5RQzqiRUJHFI8/3Dpdh9vupqG0JLBWm2DpVNcbS1AMuVmRmcJeJ24nGBJW3v 1ApueiWqnOV+N9ZRxaLNgLvQ9CpPR96g95intW4JEeyDri1GTxSllwqY+0Q51Utzo00d wnJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=FX2GofpeiQkFfaPg/yi7edLinY/+dfIwrzG4QA855os=; b=LTtJ6xaf5xAepes8fKGLN7djE8rmr8o90wNrl/8WY9JX/a4ni19hbTHszYfFvtYear a5PK6K/QwinPFUUFO3rGhVuvsSpk8XhB1/qc4gELeVcrIqr7QonnlGczmtS89iU5aBco HyGkGY3Gwj7PSrNIrMcv3V2/ciHodQCc2fOTk5d5vslnc69Donr5JJqVIo22gEB4AtH/ XdLGZTQ9IkH9fDSarLQfgZ2ynSTzaFy5kxV6XgpcXjPbnjX9RPs1TM/vz9oQcdJlVijq q3OzcO6xISI0zRDKLgbi3NJLMKL00U2j1oWy34wFERfalZO+50NRUnurJw/uJruWWBC5 BUhQ== X-Gm-Message-State: AOAM5323AEMGevYNEeS6E93mOzj7jWCIwgBM5VysnnULmCq3WBmMK7Vu zYi4INW8WdID051tlywcnejx6g== X-Google-Smtp-Source: ABdhPJx0SfjVdnkOEa+Ejl5RI0w1+Y8flGVe8NEqVLGMHUi7r36qgIFGoMSD0GWe19Y6IiiHgnQe2w== X-Received: by 2002:ac8:7b2e:: with SMTP id l14mr6414178qtu.499.1641967983147; Tue, 11 Jan 2022 22:13:03 -0800 (PST) Received: from ahch-to ([201.183.2.216]) by smtp.gmail.com with ESMTPSA id n18sm4687381qtx.78.2022.01.11.22.13.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jan 2022 22:13:02 -0800 (PST) Date: Wed, 12 Jan 2022 01:12:58 -0500 From: Jaime Casanova To: Simon Riggs Cc: Alvaro Herrera , Tomas Vondra , Zhihong Yu , Daniel Westermann , Amit Langote , Justin Pryzby , Pg Hackers , Pavan Deolasee Subject: Re: support for MERGE Message-ID: References: <202111152244.7ja4ihufwiqk@alvherre.pgsql> <202111152245.byerxxac444d@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="EjrEh1c+snDVePbt" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --EjrEh1c+snDVePbt Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Wed, Dec 22, 2021 at 11:35:56AM +0000, Simon Riggs wrote: > On Mon, 15 Nov 2021 at 22:45, Alvaro Herrera 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 --EjrEh1c+snDVePbt Content-Type: application/sql Content-Disposition: attachment; filename="merge1.sql" Content-Transfer-Encoding: quoted-printable MERGE INTO public.idxpart3 as target_0=0AUSING public.rtest_view2 as ref_0= =0AON target_0.a =3D ref_0.a =0AWHEN NOT MATCHED AND (pg_catalog.lastval() = =3D cast(null as int2)) or (true) =0A THEN INSERT VALUES ( 20);=0A --EjrEh1c+snDVePbt Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="merge1.stacktrace.txt" #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 = tid = ret = #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 }} #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 = op = 0x55b840b0adb0 resultslot = 0x55b840b0ab40 innerslot = 0x55b840b08660 outerslot = 0x0 scanslot = 0x0 dispatch_table = {0x55b83f58e5c4 , 0x55b83f58e5e4 , 0x55b83f58e616 , 0x55b83f58e648 , 0x55b83f58e67a , 0x55b83f58e6db , 0x55b83f58e73c , 0x55b83f58e79d , 0x55b83f58e7bc , 0x55b83f58e7db , 0x55b83f58e7fa , 0x55b83f58e815 , 0x55b83f58e8b7 , 0x55b83f58e959 , 0x55b83f58e9fb , 0x55b83f58ea5f , 0x55b83f58eaeb , 0x55b83f58eb0c , 0x55b83f58eb39 , 0x55b83f58eb92 , 0x55b83f58ebad , 0x55b83f58ebc8 , 0x55b83f58ebcf , 0x55b83f58ec16 , 0x55b83f58ec4c , 0x55b83f58ec53 , 0x55b83f58ec9a , 0x55b83f58ecd0 , 0x55b83f58ecf5 , 0x55b83f58ed43 , 0x55b83f58ed64 , 0x55b83f58ed9a , 0x55b83f58edd0 , 0x55b83f58ee10 , 0x55b83f58ee3f , 0x55b83f58ee6e , 0x55b83f58ee89 , 0x55b83f58eea4 , 0x55b83f58eecb , 0x55b83f58ef0d , 0x55b83f58ef4f , 0x55b83f58ef76 , 0x55b83f58ef91 , 0x55b83f58efac , 0x55b83f58efc5 , 0x55b83f58f053 , 0x55b83f58f08b , 0x55b83f58f1c9 , 0x55b83f58f24a , 0x55b83f58f2ba , 0x55b83f58f323 , 0x55b83f58f33a , 0x55b83f58f345 , 0x55b83f58f35c , 0x55b83f58f373 , 0x55b83f58f38e , 0x55b83f58f3a5 , 0x55b83f58f467 , 0x55b83f58f511 , 0x55b83f58f528 , 0x55b83f58f540 , 0x55b83f58f558 , 0x55b83f58f570 , 0x55b83f58f5a8 , 0x55b83f58f5aa , 0x55b83f58f5aa , 0x55b83f58f00c , 0x55b83f58f604 , 0x55b83f58f618 , 0x55b83f58f5c0 , 0x55b83f58f5d8 , 0x55b83f58f5ec , 0x55b83f58f62c , 0x55b83f58f643 , 0x55b83f58f69d , 0x55b83f58f6b4 , 0x55b83f58f715 , 0x55b83f58f730 , 0x55b83f58f75b , 0x55b83f58f7d9 , 0x55b83f58f829 , 0x55b83f58f874 , 0x55b83f58f8e4 , 0x55b83f58f9f6 , 0x55b83f58faef , 0x55b83f58fbe1 , 0x55b83f58fd30 , 0x55b83f58fe61 , 0x55b83f58ff85 , 0x55b83f58ffa0 , 0x55b83f58ffbb } #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 = oldContext = 0x55b840ad7b40 retDatum = oldContext = #6 ExecProject (projInfo=0x55b840b0ac10) at ../../../src/include/executor/executor.h:373 econtext = 0x55b840b0aa10 state = 0x55b840b0ac18 slot = 0x55b840b0ab40 isnull = false econtext = state = slot = isnull = #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 = l__state = econtext = rootRelInfo = 0x55b840ad8538 insert_slot = actionStates = l = __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 = tupleid = tuple_ctid = {ip_blkid = {bi_hi = 0, bi_lo = 0}, ip_posid = 0} matched = datum = isNull = #9 0x000055b83f5c9c03 in ExecModifyTable (pstate=0x55b840ad7f08) at nodeModifyTable.c:2579 datum = isNull = resultoid = node = 0x55b840ad7f08 estate = 0x55b840ad7c60 operation = CMD_MERGE resultRelInfo = 0x55b840ad8120 subplanstate = 0x55b840ad8858 slot = 0x55b840b08660 planSlot = 0x55b840b08660 oldSlot = tupleid = 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 = proute = 0x55b840b0b558 relinfos = 0x0 lc = __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=, 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 = 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=, 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 = 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 = result = nprocessed = 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 = per_parsetree_context = 0x0 plantree_list = 0x55b840aed6d8 parsetree = 0x55b840a030c0 commandTag = qc = {commandTag = CMDTAG_UNKNOWN, nprocessed = 0} querytree_list = portal = 0x55b840a66520 receiver = 0x55b840aed730 format = 0 parsetree_item__state = 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=, username=) 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 = 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 }} selres = now = readmask = {fds_bits = {224, 0 }} nSockets = 8 last_lockfile_recheck_time = 1641966476 last_touch_time = 1641966295 __func__ = "ServerLoop" #23 0x000055b83f6b5971 in PostmasterMain (argc=3, argv=) at postmaster.c:1474 opt = status = userDoption = listen_addr_saved = true i = output_config_variable = __func__ = "PostmasterMain" #24 0x000055b83f5f429b in main (argc=3, argv=0x55b8409faec0) at main.c:198 No locals. --EjrEh1c+snDVePbt Content-Type: application/sql Content-Disposition: attachment; filename="merge2.sql" Content-Transfer-Encoding: quoted-printable MERGE INTO public.part_7 as target_0=0AUSING public.tenk1 as ref_0=0A left= join public.num_exp_ln as sample_0 =0A on (ref_0.twenty =3D sample_0.id )= =0AON target_0.a =3D sample_0.id =0AWHEN MATCHED AND 41 is NULL=0A THEN U= PDATE set a =3D random()*1000=0AWHEN NOT MATCHED AND 48 is not NULL=0A T= HEN INSERT VALUES ( 37, null)=0A --EjrEh1c+snDVePbt Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="merge2.stacktrace.txt" #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 = len1 = len2 = cmp = #2 0x000055b83f895893 in FunctionCall2Coll (flinfo=flinfo@entry=0x55b840ad2338, collation=, arg1=, 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' , "d\000\000\000\000U\002\000\060Q\251@\270U\000\000\000u`?\270U", '\000' , "\004\260@\270U\000"} fcinfo = 0x7ffd6bf31c40 result = __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 = 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 = part_index = -1 key = 0x55b840ad2240 partdesc = 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 = 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=, targetRelInfo=targetRelInfo@entry=0x55b840affed8, slot=slot@entry=0x55b840b1a3b0, partRelInfo=partRelInfo@entry=0x7ffd6bf31f58) at nodeModifyTable.c:2426 partrel = map = #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 = recheckIndexes = 0x0 result = 0x0 ar_insert_trig_tcs = node = onconflict = ONCONFLICT_NONE proute = oldContext = #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 = l__state = econtext = rootRelInfo = 0x55b840affed8 insert_slot = 0x55b840b1a3b0 actionStates = l = __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 = tupleid = tuple_ctid = {ip_blkid = {bi_hi = 0, bi_lo = 0}, ip_posid = 0} matched = datum = isNull = #10 0x000055b83f5c9c03 in ExecModifyTable (pstate=0x55b840affaa8) at nodeModifyTable.c:2579 datum = isNull = resultoid = node = 0x55b840affaa8 estate = 0x55b840aff800 operation = CMD_MERGE resultRelInfo = 0x55b840affcc0 subplanstate = 0x55b840b001f8 slot = 0x55b840b15400 planSlot = 0x55b840b15400 oldSlot = tupleid = 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 = proute = 0x55b840b1a448 relinfos = 0x0 lc = __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=, 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 = 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=, 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 = 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 = result = nprocessed = 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 = per_parsetree_context = 0x0 plantree_list = 0x7fbc3f3e82f0 parsetree = 0x55b840a035b0 commandTag = qc = {commandTag = CMDTAG_UNKNOWN, nprocessed = 0} querytree_list = portal = 0x55b840a6c8a0 receiver = 0x7fbc3f3e8348 format = 0 parsetree_item__state = 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=, username=) 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 = 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 }} selres = now = readmask = {fds_bits = {224, 0 }} nSockets = 8 last_lockfile_recheck_time = 1641966712 last_touch_time = 1641966295 __func__ = "ServerLoop" #24 0x000055b83f6b5971 in PostmasterMain (argc=3, argv=) at postmaster.c:1474 opt = status = userDoption = listen_addr_saved = true i = output_config_variable = __func__ = "PostmasterMain" #25 0x000055b83f5f429b in main (argc=3, argv=0x55b8409faec0) at main.c:198 No locals. --EjrEh1c+snDVePbt--