Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLbjy-0007QM-GC for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Aug 2015 18:42:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZLbjx-0001ej-JW for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Aug 2015 18:42:37 +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 1ZLbig-0000E0-O3 for pgsql-hackers@postgresql.org; Sat, 01 Aug 2015 18:41:18 +0000 Received: from gauss.credativ.com ([93.94.130.89]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZLbia-0002z8-KC for pgsql-hackers@postgresql.org; Sat, 01 Aug 2015 18:41:14 +0000 Received: from gauss.credativ.com (localhost [127.0.0.1]) by gauss.credativ.com (Postfix) with ESMTP id 3C1971450014; Sat, 1 Aug 2015 20:41:10 +0200 (CEST) Received: from ex (ip-109-41-158-143.web.vodafone.de [109.41.158.143]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: ase@gauss.credativ.com) by gauss.credativ.com (Postfix) with ESMTPSA id D17151450011; Sat, 1 Aug 2015 20:41:09 +0200 (CEST) From: Andreas Seltenreich To: Tom Lane Cc: pgsql-hackers@postgresql.org Subject: Re: [sqlsmith] Failed assertion in joinrels.c In-Reply-To: <2086.1438444757@sss.pgh.pa.us> (Tom Lane's message of "Sat, 01 Aug 2015 11:59:17 -0400") References: <87wpxfygg9.fsf@credativ.de> <15630.1438391483@sss.pgh.pa.us> <87614zxroq.fsf@credativ.de> <2086.1438444757@sss.pgh.pa.us> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4 (gnu/linux) Message-ID: <87vbcyx36q.fsf@credativ.de> Date: Sat, 01 Aug 2015 20:40:29 +0200 MIME-Version: 1.0 Content-Type: text/plain X-Pg-Spam-Score: -2.6 (--) 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 Tom Lane writes: > Well, I certainly think all of these represent bugs: > > [...] thanks for priorizing them. I'll try to digest them somewhat before posting. > 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 This is actually the one from the README :-). Quoting to spare media discontinuity: --8<---------------cut here---------------start------------->8--- Taking a closer look at it reveals that it happens when you query a certain catalog view like this: self=# select indexdef from pg_catalog.pg_indexes where indexdef is not NULL; FEHLER: cache lookup failed for index 2619 This is because the planner then puts pg_get_indexdef(oid) in a context where it sees non-index-oids, which causes it to croak: QUERY PLAN ------------------------------------------------------------------------------------ Hash Join (cost=17.60..30.65 rows=9 width=4) Hash Cond: (i.oid = x.indexrelid) -> Seq Scan on pg_class i (cost=0.00..12.52 rows=114 width=8) Filter: ((pg_get_indexdef(oid) IS NOT NULL) AND (relkind = 'i'::"char")) -> Hash (cost=17.31..17.31 rows=23 width=4) -> Hash Join (cost=12.52..17.31 rows=23 width=4) Hash Cond: (x.indrelid = c.oid) -> Seq Scan on pg_index x (cost=0.00..4.13 rows=113 width=8) -> Hash (cost=11.76..11.76 rows=61 width=8) -> Seq Scan on pg_class c (cost=0.00..11.76 rows=61 width=8) Filter: (relkind = ANY ('{r,m}'::"char"[])) --8<---------------cut here---------------end--------------->8--- thanks, Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers