Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory? - Mailing list pgsql-performance

From Thomas Kellerer
Subject Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?
Date
Msg-id jid61c$9fi$1@dough.gmane.org
Whole thread Raw
In response to PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?  (Stefan Keller <sfkeller@gmail.com>)
List pgsql-performance
Stefan Keller wrote on 26.02.2012 01:16:
> 2. Are there any hints on how to tell Postgres to read in all table
> contents into memory?

What about creating tablespace on a RAM Fileystem (tmpfs), then create a second schema in your database where all
tablesare located in the that "temp" tablespace. 

Then upon startup (or using triggers) you can copy all data from the persistent tables to the memory tables.

It would probably make sense to change the value of random_page_cost for that tablespace to 1

I'm not sure though how PostgreSQL handles a system-restart with tables on a tablespace that might not be there.

Thomas






pgsql-performance by date:

Previous
From: Stefan Keller
Date:
Subject: Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?
Next
From: Stephen Frost
Date:
Subject: Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?