On Sat, Oct 19, 2013 at 11:53 AM, Tom Lane <t...@sss.pgh.pa.us> wrote:
> Soroosh Sardari <soroosh.sard...@gmail.com> writes: > > I need to get a Relation instance but I have only a RelFileNode! > > Why do you think you need to do that? Such a lookup is inherently the > wrong thing, because relations' relfilenode values are not fixed (unless > you have a lock on the relation, which presumably you don't). > > regards, tom lane > I know, it's against PG abstraction. In PG we don't need to know anything about relation in the smgr level. but in my project i want to encrypt all pages of a particular relation and decrypt it when those pages are fetching back to buffer. This behavior depends on some relation properties. So in smgropen I must get some knowledge about the relation and all of i have is RelFileNode. I can not see the pg_class for the relation oid, because smgropen may called before insertion in pg_class. Soroosh