From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Greg Smith <greg(at)2ndquadrant(dot)com> |
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:40:33 |
Message-ID: | 29893.1286466033@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Greg Smith <greg(at)2ndquadrant(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Leonardo Francalanci | 2010-10-07 16:13:01 | Re: Tutorials on high availability Postgresql setup? |
Previous Message | Tom Lane | 2010-10-07 15:33:22 | Re: PostgreSQL 7.4.16 is creating strange files under /var/lib/pgsql |