* Jack Christensen ([email protected]) wrote: > On 05/09/2015 06:33 AM, Stephen Frost wrote: > >Temporary tables will be in memory unless they overflow work_mem > >and we do support unlogged tables and tablespaces which you could > >stick out on a ramdisk if you want. > I would suggest not putting a table space on a ramdisk. According to > the docs this risks corrupting the entire cluster. > > http://www.postgresql.org/docs/9.4/static/manage-ag-tablespaces.html
That warning is about reliability of the cluster, not corruption,
technically speaking. Still, you're right, that comment of mine was a
bit too nonchalant about it and it's an area that we do need to improve
the support of by being able to deal with the realities of a ramdisk,
perhaps by having a flag associated with the tablespace and then
accepting that files may not exist at startup (or when we go to access
them).
All that said, and I won't say that I've tested it as much as I would if
it was being done in a production environment, but I've used a ramdisk
under a tablespace by copying what's there after creation of the
tablespace and tables (which should be unlogged) that you want there and
then restoring that on reboot. Might be worth a blog post about, to see
if anyone else is doing that or if people have run into issues with it.
It was a while ago and I don't recall anything else being needed, but
it's possible I've forgotten. :)
Thanks!
Stephen
signature.asc
Description: Digital signature
