Re: pg_relation_size / could not open relation with OID #

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tomas Vondra <tv(at)fuzzy(dot)cz>, pgsql-general(at)postgresql(dot)org
Subject: Re: pg_relation_size / could not open relation with OID #
Date: 2010-10-07 15:07:09
Message-ID: 4CADE21D.4080107@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> It strikes me that if we were willing to throw code at the problem,
> we could make it work like this:
> ...
> This would properly throw error for cases where you'd passed the wrong
> catalog's OID column to pg_relation_size.

Yeah, you're right that is the proper way to handle this. As the
problem isn't that serious once you're aware of it, I don't see a large
amount of motivation to work on that now though, if that's what it will
take to fix. And Tomas seemed satisfied with a workaround too. I just
added a TODO item pointing to your suggested implementation so it's more
likely people will stumble onto the relevant trivia here on their own,
and maybe some day a patch will get written to implement that idea too.

--
Greg Smith, 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services and Support www.2ndQuadrant.us
Author, "PostgreSQL 9.0 High Performance" Pre-ordering at:
https://www.packtpub.com/postgresql-9-0-high-performance/book

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message A.M. 2010-10-07 15:07:33 Re: queriing the version of libpq
Previous Message Juan Sueiro 2010-10-07 15:01:34 Re: PostgreSQL 7.4.16 is creating strange files under /var/lib/pgsql