Re: Update on Supporting Encryption in Postgresql - Mailing list pgsql-hackers

From Murat Kantarcioglu
Subject Re: Update on Supporting Encryption in Postgresql
Date
Msg-id chsu2v$2jbl$1@news.hub.org
Whole thread Raw
In response to Re: Update on Supporting Encryption in Postgresql  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-hackers
Our basic claim is to be able to do most of the encryption while we are 
reading the page. That is the reason I need the threads. Any suggestion 
about the threads are welcome. Thanks.                                                          Murat

Alvaro Herrera wrote:
> On Fri, Sep 10, 2004 at 11:52:26AM -0500, Murat Kantarcioglu wrote:
> 
> 
>>Can you suggest me a solution to how to do
>>this on Postgresql backend?
>>
>>I am asssuming that somewhere in the code, you are calling a function like
>>     getPage(Page_id)
>>to retrieve the page(I am trying to change backend)
> 
> 
> Probably the code you want to modify is in src/backend/storage/smgr.
> Maybe you want to add a different storage manager (they are pluggable,
> sort of).
> 
> 
>>       getPage(Page_id)
>>     {
>>       ctr=Hash_Table(Page_id) //return somevalue needed for deccryption
>>        Thread_Read(Page_id) // will call the original read code
>>         Thread_Encryption.start(ctr, length);
>>         when both threads are done finish the encryption
>>     }
> 
> 
> I think it would need extensive, painful and unwelcome modifications to
> use threads to do the job.  You could just as well do it sequentially,
> like in
> 
> encryptedPage = getPage(page_id);
> clearPage = unencrypt(encryptedPage);
> return clearPage;
> 
> 
> And the reverse for storage.  This may only need modifications to
> mdread() and mdwrite() ... unless your encryption scheme returns a
> different length than the original.
> 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Update on Supporting Encryption in Postgresql
Next
From: Murat Kantarcioglu
Date:
Subject: Re: Update on Supporting Encryption in Postgresql