Search Postgresql Archives

Re: pg_relation_size / could not open relation with OID #

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greg Smith <greg@xxxxxxxxxxxxxxx> writes:
> 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.

Well, if we're leaving TODO crumbs, what I had in mind was:

1. Use try_relation_open() not relation_open() to start with.

2. On failure return, do something like

	if (relation_recently_dead(relid))
		... return NULL ...
	else
		... throw error ...

relation_recently_dead() would probably be a few dozen lines of code,
but it could be shared among all places where we want to do something
like this.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux