pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: System tables screwed up? (WAS requested shared memory size overflows size_t)
2+ messages / 2 participants
[nested] [flat]
* Re: System tables screwed up? (WAS requested shared memory size overflows size_t)
@ 2010-06-24 23:24 Craig James <craig_james@emolecules.com>
0 siblings, 1 reply; 2+ messages in thread
From: Craig James @ 2010-06-24 23:24 UTC (permalink / raw)
To: Alvaro Herrera <alvherre@commandprompt.com>; pgsql-performance
On 6/24/10 4:19 PM, Alvaro Herrera wrote:
> Excerpts from Craig James's message of jue jun 24 19:03:00 -0400 2010:
>
>> select relname, pg_relation_size(relname) from pg_class
>> where pg_get_userbyid(relowner) = 'emol_warehouse_1'
>> and relname not like 'pg_%'
>> order by pg_relation_size(relname) desc;
>> ERROR: relation "rownum_temp" does not exist
>>
>> emol_warehouse_1=> select relname from pg_class where relname = 'rownum_temp';
>> relname
>> ----------------------
>> rownum_temp
>> (1 row)
>
> What's the full row? I'd just add a "WHERE relkind = 'r'" to the above
> query anyway.
Thanks, in fact that works. But my concern is that these are system tables and system functions and yet they seem to be confused. I've used this query dozens of times and never seen this behavior before. It makes me really nervous...
Craig
P.S. Sorry I got the Subject wrong the first time by hitting the REPLY key mindlessly, I've changed it now.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: System tables screwed up? (WAS requested shared memory size overflows size_t)
@ 2010-06-24 23:55 Alvaro Herrera <alvherre@commandprompt.com>
parent: Craig James <craig_james@emolecules.com>
0 siblings, 0 replies; 2+ messages in thread
From: Alvaro Herrera @ 2010-06-24 23:55 UTC (permalink / raw)
To: Craig James <craig_james@emolecules.com>; +Cc: pgsql-performance
Excerpts from Craig James's message of jue jun 24 19:24:44 -0400 2010:
> On 6/24/10 4:19 PM, Alvaro Herrera wrote:
> > Excerpts from Craig James's message of jue jun 24 19:03:00 -0400 2010:
> >
> >> select relname, pg_relation_size(relname) from pg_class
> >> where pg_get_userbyid(relowner) = 'emol_warehouse_1'
> >> and relname not like 'pg_%'
> >> order by pg_relation_size(relname) desc;
> >> ERROR: relation "rownum_temp" does not exist
> >>
> >> emol_warehouse_1=> select relname from pg_class where relname = 'rownum_temp';
> >> relname
> >> ----------------------
> >> rownum_temp
> >> (1 row)
> >
> > What's the full row? I'd just add a "WHERE relkind = 'r'" to the above
> > query anyway.
>
> Thanks, in fact that works. But my concern is that these are system tables and system functions and yet they seem to be confused. I've used this query dozens of times and never seen this behavior before. It makes me really nervous...
I think you're being bitten by lack of schema qualification. Perhaps
you ought to pass pg_class.oid to pg_relation_size instead of relname.
What did you do to make pg_relation_size to work on type name?
Why is this a -performance question anyway?
--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2010-06-24 23:55 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-06-24 23:24 Re: System tables screwed up? (WAS requested shared memory size overflows size_t) Craig James <craig_james@emolecules.com>
2010-06-24 23:55 ` Re: System tables screwed up? (WAS requested shared memory size overflows size_t) Alvaro Herrera <alvherre@commandprompt.com>
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