"no relation entry for relid 1"
I've built Postgres from master, and found that the following fairly
simple query breaks:
select count(*)
from
(
select
schemaname
from pg_stat_user_tables
order by 1
) sub
group by schemaname
This produces the internal error message "no relation entry for relid
1". Why is that?
--
Peter Geoghegan http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services
On Thu, Sep 29, 2011 at 3:26 PM, Peter Geoghegan <peter@2ndquadrant.com> wrote:
I've built Postgres from master, and found that the following fairly
simple query breaks:select count(*)
from
(
select
schemaname
from pg_stat_user_tables
order by 1
) sub
group by schemanameThis produces the internal error message "no relation entry for relid
1". Why is that?
hm -- works for me (9.1.0)
merlin
On 29 September 2011 21:59, Merlin Moncure <mmoncure@gmail.com> wrote:
hm -- works for me (9.1.0)
It works for me on REL9_1_STABLE too, unsurprisingly, as I would think
it highly unlikely that such a glaring bug would slip into a stable
release.
--
Peter Geoghegan http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services
2011/9/29 Peter Geoghegan <peter@2ndquadrant.com>:
On 29 September 2011 21:59, Merlin Moncure <mmoncure@gmail.com> wrote:
hm -- works for me (9.1.0)
It works for me on REL9_1_STABLE too, unsurprisingly, as I would think
it highly unlikely that such a glaring bug would slip into a stable
release.
Have you did a make distclean before build, then init a new $PGDATA?
--
Dickson S. Guedes
mail/xmpp: guedes@guedesoft.net - skype: guediz
http://guedesoft.net - http://www.postgresql.org.br
On 30/09/11 10:08, Dickson S. Guedes wrote:
2011/9/29 Peter Geoghegan<peter@2ndquadrant.com>:
On 29 September 2011 21:59, Merlin Moncure<mmoncure@gmail.com> wrote:
hm -- works for me (9.1.0)
It works for me on REL9_1_STABLE too, unsurprisingly, as I would think
it highly unlikely that such a glaring bug would slip into a stable
release.Have you did a make distclean before build, then init a new $PGDATA?
I can confirm this - checkout from 2 days ago, maintainer-clean + build
and initdb.
Peter Geoghegan <peter@2ndquadrant.com> writes:
I've built Postgres from master, and found that the following fairly
simple query breaks:
select count(*)
from
(
select
schemaname
from pg_stat_user_tables
order by 1
) 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:
Fixed, thanks for the report!
regards, tom lane
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
(
select
schemaname
from pg_stat_user_tables
order by 1
) sub
group by schemanameThis produces the internal error message "no relation entry for relid
1". Why is that?Looks like I broke it here:
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.
--
Peter Geoghegan http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services
Peter Geoghegan <peter@2ndquadrant.com> writes:
On 29 September 2011 23:15, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Looks like I broke it here:
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=1cb108efb0e60d87e4adec38e7636b6e8efbeb57
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.
Well, the SQLSTATE for this sort of thing is already
ERRCODE_INTERNAL_ERROR. As to whether it's more severe than other
errors, I'm not convinced. It didn't crash, nor corrupt your data.
regards, tom lane