Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YzFIR-0004Sc-Ls for pgsql-committers@arkaria.postgresql.org; Mon, 01 Jun 2015 02:17:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YzFIQ-00017f-Sp for pgsql-committers@arkaria.postgresql.org; Mon, 01 Jun 2015 02:17:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YzFIP-00015X-Mi for pgsql-committers@postgresql.org; Mon, 01 Jun 2015 02:17:45 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1YzFIL-0005Fd-NS for pgsql-committers@postgresql.org; Mon, 01 Jun 2015 02:17:44 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t512HdlT014013; Sun, 31 May 2015 22:17:39 -0400 From: Tom Lane To: Andrew Dunstan cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Rename jsonb_replace to jsonb_set and allow it to add new values In-reply-to: <5085.1433124399@sss.pgh.pa.us> References: <4442.1433122849@sss.pgh.pa.us> <556BBA3C.4020406@dunslane.net> <5085.1433124399@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Sun, 31 May 2015 22:06:39 -0400" Date: Sun, 31 May 2015 22:17:39 -0400 Message-ID: <14012.1433125059@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org I wrote: > Some of the other machines are showing crashes, not just minor output > diffs. I tried HEAD on two different machines, and they are both showing Assert failures here: (gdb) bt #0 0x000000341ce32625 in raise () from /lib64/libc.so.6 #1 0x000000341ce33e05 in abort () from /lib64/libc.so.6 #2 0x00000000007b18f9 in ExceptionalCondition ( conditionName=, errorType=, fileName=, lineNumber=) at assert.c:54 #3 0x000000000072bd2b in pushJsonbValueScalar (pstate=0x7fff149ec388, seq=, scalarVal=0x7fff149ec280) at jsonb_util.c:584 #4 0x000000000072c0f7 in pushJsonbValue (pstate=0x7fff149ec388, seq=, jbval=) at jsonb_util.c:528 #5 0x000000000072e1a3 in setPathObject (it=0x7fff149ec390, path_elems=0x201f9c8, path_nulls=0x201f9e8 "", path_len=1, st=0x7fff149ec388, level=0, newval=0x1fe9628, create=1 '\001') at jsonfuncs.c:3724 #6 setPath (it=0x7fff149ec390, path_elems=0x201f9c8, path_nulls=0x201f9e8 "", path_len=1, st=0x7fff149ec388, level=0, newval=0x1fe9628, create=1 '\001') at jsonfuncs.c:3682 #7 0x000000000072e912 in jsonb_set (fcinfo=) at jsonfuncs.c:3486 #8 0x00000000005d0769 in ExecMakeFunctionResultNoSets (fcache=0x1feacc0, econtext=0x1feb690, isNull=0x7fff149ec4bf "", isDone=) at execQual.c:2018 #9 0x00000000005d12cf in ExecEvalFunc (fcache=0x1feacc0, econtext=0x1feb690, (gdb) p debug_query_string $2 = 0x1fa6698 "select jsonb_set('{}','{x}','{\"foo\":123}');" (gdb) f 3 #3 0x000000000072bd2b in pushJsonbValueScalar (pstate=0x7fff149ec388, seq=, scalarVal=0x7fff149ec280) at jsonb_util.c:584 584 Assert(scalarVal->type == jbvString); (gdb) p *scalarVal $1 = {type = 33460272, val = {numeric = 0x3400000001, boolean = 1 '\001', string = {len = 1, val = 0x1fe904c "x"}, array = {nElems = 1, elems = 0x1fe904c, rawScalar = 0 '\000'}, object = {nPairs = 1, pairs = 0x1fe904c}, binary = {len = 1, data = 0x1fe904c}}} Looks like something is forgetting to initialize the type field. regards, tom lane -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers