Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLZDS-0004Zz-HT for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Aug 2015 16:00:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZLZDR-0004nj-R2 for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Aug 2015 16:00:53 +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) (envelope-from ) id 1ZLZC9-0003IR-Je for pgsql-hackers@postgresql.org; Sat, 01 Aug 2015 15:59:33 +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 1ZLZC1-0008Kx-Q6 for pgsql-hackers@postgresql.org; Sat, 01 Aug 2015 15:59:32 +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 t71FxHiv002087; Sat, 1 Aug 2015 11:59:17 -0400 From: Tom Lane To: Andreas Seltenreich cc: pgsql-hackers@postgresql.org Subject: Re: [sqlsmith] Failed assertion in joinrels.c In-reply-to: <87614zxroq.fsf@credativ.de> References: <87wpxfygg9.fsf@credativ.de> <15630.1438391483@sss.pgh.pa.us> <87614zxroq.fsf@credativ.de> Comments: In-reply-to Andreas Seltenreich message dated "Sat, 01 Aug 2015 11:51:17 +0200" Date: Sat, 01 Aug 2015 11:59:17 -0400 Message-ID: <2086.1438444757@sss.pgh.pa.us> X-Pg-Spam-Score: -3.0 (---) 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 Andreas Seltenreich writes: > Tom Lane writes: >> What concerns me more is that what you're finding is only cases that trip >> an assertion sanity check. It seems likely that you're also managing to >> trigger other bugs with less drastic consequences, such as "could not >> devise a query plan" failures or just plain wrong answers. > Ja, some of these are logged as well[1], but most of them are really as > undrastic as can get, and I was afraid reporting them would be more of a > nuisance. Well, I certainly think all of these represent bugs: > 3 | ERROR: plan should not reference subplan's variable > 2 | ERROR: failed to assign all NestLoopParams to plan nodes > 1 | ERROR: could not find pathkey item to sort This I'm not sure about; it could be that the query gave conflicting collation specifiers, but on the other hand we've definitely had bugs with people forgetting to run assign_query_collations on subexpressions: > 4646 | ERROR: could not determine which collation to use for string comparison This one's pretty darn odd, because 2619 is pg_statistic and not an index at all: > 4 | ERROR: cache lookup failed for index 2619 These seem likely to be bugs as well, though maybe they are race conditions during a DROP and not worth fixing: > 1171 | ERROR: cache lookup failed for index 16862 > 172 | ERROR: cache lookup failed for index 257148 > 84 | ERROR: could not find member 1(34520,34520) of opfamily 1976 > 55 | ERROR: missing support function 1(34516,34516) in opfamily 1976 > 13 | ERROR: could not find commutator for operator 34538 > 2 | ERROR: cache lookup failed for index 12322 I would say anything of the sort that is repeatable definitely deserves investigation, because even if it's an expectable error condition, we should be throwing a more user-friendly error message. 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