From: Andreas Seltenreich <seltenreich@gmx.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [sqlsmith] Failed assertion in joinrels.c
Date: Sat, 01 Aug 2015 20:40:29 +0200
Message-ID: <87vbcyx36q.fsf@credativ.de> (raw)
In-Reply-To: <2086.1438444757@sss.pgh.pa.us>
References: <87wpxfygg9.fsf@credativ.de>
<15630.1438391483@sss.pgh.pa.us>
<87614zxroq.fsf@credativ.de>
<2086.1438444757@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: seltenreich@gmx.de, tgl@sss.pgh.pa.us
Subject: Re: [sqlsmith] Failed assertion in joinrels.c
In-Reply-To: <87vbcyx36q.fsf@credativ.de>
References: <87wpxfygg9.fsf@credativ.de> <15630.1438391483@sss.pgh.pa.us> <87614zxroq.fsf@credativ.de> <2086.1438444757@sss.pgh.pa.us> <87vbcyx36q.fsf@credativ.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox