database - Is it possible to not write the result of a Postgres query to the disk? -


i wanted use postgres in memory store. after create materialized view, not want result written disk kept stored in memory. have lot of memory (>100gb) , not need use disk. wondering if possible so.

found solution: keeping postgres entirely in memory

it's possible ramdisk, it's really inefficient. you'll have @ least two, three, copies of data in ram - ramdisk, os buffers/cache, , postgresql's shared_buffers.

what should instead allocate disk space anyway, set linux's dirty writeback thresholds high, turn fsync off in postgresql, use unlogged tables, , let run in non-crashsafe mode entirely ram.

let os smart - can still write , flush data lazily, making more room in ram.

if feel need in-ram database, you'd better off finding 1 that's designed work way. it's pretty rare need it.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -