Re: pg_relation_size / could not open relation with OID # - Mailing list pgsql-general

From Greg Smith
Subject Re: pg_relation_size / could not open relation with OID #
Date
Msg-id 4CADE21D.4080107@2ndquadrant.com
Whole thread Raw
In response to Re: pg_relation_size / could not open relation with OID #  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_relation_size / could not open relation with OID #  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@2ndQuadrant.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


pgsql-general by date:

Previous
From: Juan Sueiro
Date:
Subject: Re: PostgreSQL 7.4.16 is creating strange files under /var/lib/pgsql
Next
From: Digimer
Date:
Subject: Re: Tutorials on high availability Postgresql setup?