Re: "no relation entry for relid 1" - Mailing list pgsql-bugs

From Peter Geoghegan
Subject Re: "no relation entry for relid 1"
Date
Msg-id CAEYLb_XpfhdaaEhJ4OmgbRZc-JGVt_OiDa7P3m55QBJbfKvxog@mail.gmail.com
Whole thread Raw
In response to Re: "no relation entry for relid 1"  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: "no relation entry for relid 1"  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On 29 September 2011 23:15, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Peter Geoghegan <peter@2ndquadrant.com> writes:
>> I've built Postgres from master, and found that the following fairly
>> simple query breaks:
>
>> select count(*)
>> from
>> (
>> =A0 =A0 =A0 select
>> =A0 =A0 =A0 schemaname
>> =A0 =A0 =A0 from =A0 =A0 =A0 =A0 =A0 =A0pg_stat_user_tables
>> =A0 =A0 =A0 order by =A0 =A0 =A0 =A01
>> ) sub
>> group by schemaname
>
>> This produces the internal error message "no relation entry for relid
>> 1". Why is that?
>
> Looks like I broke it here:
>
> http://git.postgresql.org/gitweb/?p=3Dpostgresql.git;a=3Dcommitdiff;h=3D1=
cb108efb0e60d87e4adec38e7636b6e8efbeb57

Hmm. Although it was obvious to me that this was an internal error, I
have to wonder what a novice would have made of it. Specifically, I
wonder if there should be an INTERNAL_ERROR severity level, to
explicitly advertise that you're not supposed to see this, and to help
log analysis tools (including grep) bring these sorts of things to the
DBA's attention, as they are surely much more severe than most errors
seen in practice.

--=20
Peter Geoghegan =A0 =A0 =A0 http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: "no relation entry for relid 1"
Next
From: Tom Lane
Date:
Subject: Re: "no relation entry for relid 1"