Re: [sqlsmith] Failed assertion in joinrels.c

From: Andreas Seltenreich <seltenreich(at)gmx(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [sqlsmith] Failed assertion in joinrels.c
Date: 2015-08-01 18:40:29
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-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

> 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

--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:

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---


In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2015-08-01 19:01:28 Re: pg_rewind failure by file deletion in source server
Previous Message Noah Misch 2015-08-01 18:13:35 Re: Solaris testers wanted for strxfrm() behavior