Re: RelFileNode to Relation - Mailing list pgsql-hackers

From Soroosh Sardari
Subject Re: RelFileNode to Relation
Date
Msg-id CAFUsPDYKcYwqYMMfDp=zsBtMZjCWXNSkVWWAJygcF-R_vksHpA@mail.gmail.com
Whole thread Raw
In response to Re: RelFileNode to Relation  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
<div dir="ltr"><br /><div class="gmail_extra"><div class="gmail_quote">On Sat, Oct 19, 2013 at 11:53 AM, Tom Lane <span
dir="ltr"><<ahref="mailto:tgl@sss.pgh.pa.us" target="_blank">tgl@sss.pgh.pa.us</a>></span> wrote:<br
/><blockquoteclass="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div
class="im">SorooshSardari <<a href="mailto:soroosh.sardari@gmail.com">soroosh.sardari@gmail.com</a>> writes:<br
/>> I need to get a Relation instance but I have only a RelFileNode!<br /><br /></div>Why do you think you need to
dothat?  Such a lookup is inherently the<br /> wrong thing, because relations' relfilenode values are not fixed
(unless<br/> you have a lock on the relation, which presumably you don't).<br /><br />                         regards,
tomlane<br /></blockquote></div><br /></div><div class="gmail_extra"><br /></div><div class="gmail_extra"
style="style">Iknow, it's against PG abstraction.</div><div class="gmail_extra" style="style">In PG we don't need to
knowanything about relation in the smgr level. but in my project i want to encrypt</div><div class="gmail_extra"
style="style">allpages of a particular relation and decrypt it when those pages are fetching back to buffer.</div><div
class="gmail_extra"style="style"><br /></div><div class="gmail_extra" style="style">This behavior depends on some
relationproperties. So in smgropen I must get some knowledge about the relation and all of i have is
RelFileNode.</div><divclass="gmail_extra" style="style"><br /></div><div class="gmail_extra" style="style">I can not
seethe pg_class for the relation oid, because smgropen may called before insertion in pg_class.</div><div
class="gmail_extra"style="style"><br /></div><div class="gmail_extra" style="style">Soroosh</div></div> 

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: RelFileNode to Relation
Next
From: Dean Rasheed
Date:
Subject: Re: Updatable view columns