Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bV45s-0006bT-Uz for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Aug 2016 21:52:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bV45s-00007i-A8 for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Aug 2016 21:52:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bV45r-00007b-QP for pgsql-hackers@postgresql.org; Wed, 03 Aug 2016 21:52:51 +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_2) (envelope-from ) id 1bV45p-00055Q-52 for pgsql-hackers@postgresql.org; Wed, 03 Aug 2016 21:52:51 +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 u73LqiY4020543; Wed, 3 Aug 2016 17:52:44 -0400 From: Tom Lane To: Andreas Seltenreich cc: pgsql-hackers@postgresql.org, Oleg Bartunov , Teodor Sigaev Subject: Re: [sqlsmith] FailedAssertion("!(k == indices_count)", File: "tsvector_op.c", Line: 511) In-reply-to: <20000.1470260376@sss.pgh.pa.us> References: <87invhoj6e.fsf@credativ.de> <20000.1470260376@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Wed, 03 Aug 2016 17:39:36 -0400" Date: Wed, 03 Aug 2016 17:52:44 -0400 Message-ID: <20542.1470261164@sss.pgh.pa.us> X-Pg-Spam-Score: -3.1 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org I wrote: > I'm thinking there are two distinct bugs here. Actually, make that three bugs. I was so focused on the crashing that I failed to notice that ts_delete wasn't producing sane answers even when it didn't crash: regression=# select ts_delete(array_to_tsvector('{smith,foo,bar}'::text[]), '{smith,smith}'::text[]); ts_delete --------------------- 'smith' 'foo' 'bar' (1 row) regression=# select ts_delete(array_to_tsvector('{smith,foo,bar}'::text[]), '{smith,foo}'::text[]); ts_delete --------------- 'smith' 'bar' (1 row) regression=# select ts_delete(array_to_tsvector('{smith,foo,bar}'::text[]), '{bar,smith}'::text[]); ts_delete --------------------- 'smith' 'foo' 'bar' (1 row) The non-array version is no better: regression=# select ts_delete(array_to_tsvector('{smith,foo,bar}'::text[]), 'smith'::text); ts_delete --------------------- 'smith' 'foo' 'bar' (1 row) regression=# select ts_delete(array_to_tsvector('{smith,foo,bar}'::text[]), 'foo'::text); ts_delete --------------- 'smith' 'bar' (1 row) regression=# select ts_delete(array_to_tsvector('{smith,foo,bar}'::text[]), 'bar'::text); ts_delete --------------------- 'smith' 'foo' 'bar' (1 row) I'm not sure if ts_delete takes its second argument as verbatim lexemes or normalizes them first, but none of these words are changed by to_tsvector, so either way it seems to fail to delete stuff it should. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers