Thread: Enhancement Request

Enhancement Request

From
"Campbell, Lance"
Date:

Web Services at the University of Illinois has been using PostgreSQL for 11 years for serving up web content.  We generate around two million pages of database driven content a month.  We love the work you are doing.

 

I have an enhancement request.  Sometimes when using a database there is a need to have particular tables always in memory.  An example of this would be our web application session data.  The session data is used by a cluster of tomcat nodes.  It would be nice to have a way to say to PostgreSQL, put this particular table data in memory always.  If you already have this feature please let me know.  There would probably also need to be a way to see how much data is being taken up by these preferred tables.  This would probably require other things to also be put into memory as well like indexes. 

 

To get around this issue we are planning on implementing a second PostgreSQL database on a dedicated server in order to make sure the session data is always in memory.  But it would be nice to not actually have a second server for just session data if we really don’t need it.

 

Thanks for considering this idea.

 

 

Thanks,

 

Lance Campbell

Software Architect

Web Services at Public Affairs

217-333-0382

University of Illinois at Urbana-Champaign logo

 

 

Attachment

Re: Enhancement Request

From
Marcello Lorenzi
Date:
Hi Lance,
I don't know if you can create a tmpfs on your server and move the table with a tablespace to the tmpfs mountpoint. In this case you can reach the data on memory, but you have to mount and create the table to every server restart.

Marcello

On 03/04/2014 03:49 PM, Campbell, Lance wrote:

Web Services at the University of Illinois has been using PostgreSQL for 11 years for serving up web content.  We generate around two million pages of database driven content a month.  We love the work you are doing.

 

I have an enhancement request.  Sometimes when using a database there is a need to have particular tables always in memory.  An example of this would be our web application session data.  The session data is used by a cluster of tomcat nodes.  It would be nice to have a way to say to PostgreSQL, put this particular table data in memory always.  If you already have this feature please let me know.  There would probably also need to be a way to see how much data is being taken up by these preferred tables.  This would probably require other things to also be put into memory as well like indexes. 

 

To get around this issue we are planning on implementing a second PostgreSQL database on a dedicated server in order to make sure the session data is always in memory.  But it would be nice to not actually have a second server for just session data if we really don’t need it.

 

Thanks for considering this idea.

 

 

Thanks,

 

Lance Campbell

Software Architect

Web Services at Public Affairs

217-333-0382

University of Illinois at Urbana-Champaign logo

 

 


Attachment

Re: Enhancement Request

From
"ktm@rice.edu"
Date:
On Tue, Mar 04, 2014 at 02:49:32PM +0000, Campbell, Lance wrote:
> Web Services at the University of Illinois has been using PostgreSQL for 11 years for serving up web content.  We
generatearound two million pages of database driven content a month.  We love the work you are doing. 
>
> I have an enhancement request.  Sometimes when using a database there is a need to have particular tables always in
memory. An example of this would be our web application session data.  The session data is used by a cluster of tomcat
nodes. It would be nice to have a way to say to PostgreSQL, put this particular table data in memory always.  If you
alreadyhave this feature please let me know.  There would probably also need to be a way to see how much data is being
takenup by these preferred tables.  This would probably require other things to also be put into memory as well like
indexes.
>
> To get around this issue we are planning on implementing a second PostgreSQL database on a dedicated server in order
tomake sure the session data is always in memory.  But it would be nice to not actually have a second server for just
sessiondata if we really don't need it. 
>
> Thanks for considering this idea.
>

Hi Lance,

You might also want to take a look at pgmemcache:

http://pgfoundry.org/projects/pgmemcache/

It is a PostgreSQL interface to memcached which seems like it would fit your
needs for session data very well. The other option that was already mentioned
is to make a tmpfs tablespace.

Regards,
Ken


Re: Enhancement Request

From
David Johnston
Date:
Marcello Lorenzi wrote
> Hi Lance,
> I don't know if you can create a tmpfs on your server and move the table
> with a tablespace to the tmpfs mountpoint. In this case you can reach
> the data on memory, but you have to mount and create the table to every
> server restart.

Have you done this successfully, including failure testing?  If not then it
is not something you should recommend.

Recent comments on the lists indicate that mounting tablespaces on volatile
filesystems is not a valid configuration since the tablespace and its
contents must be present as server startup.  You would never get a chance to
"create the table" since the server would not boot.

David J.




--
View this message in context: http://postgresql.1045698.n5.nabble.com/Enhancement-Request-tp5794609p5794643.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.