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

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?
Дата
Msg-id jid61c$9fi$1@dough.gmane.org
обсуждение исходный текст
Ответ на 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>)
Список 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 по дате отправления:

Предыдущее
От: Stefan Keller
Дата:
Сообщение: Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?