Re: pg_relation_size / could not open relation with OID #
От | Tom Lane |
---|---|
Тема | Re: pg_relation_size / could not open relation with OID # |
Дата | |
Msg-id | 29893.1286466033@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: pg_relation_size / could not open relation with OID # (Greg Smith <greg@2ndquadrant.com>) |
Список | pgsql-general |
Greg Smith <greg@2ndquadrant.com> 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
В списке pgsql-general по дате отправления: