Hello, I have windows version of EnterpriseDb 11.2 with default install at C:\Program Files\PostgreSQL. I would like to store the tempdb or the temp_tablespaces location to another place like e:\pgdata\tempdb. How do I do this?
Please find the below steps to create temptablespaces.
The value passed to temp_tablespaces in postgresql.conf file is a list of names of tablespaces.
For example temp_tablespaces = 'temptablespace'
A tablespace must be created first as superuser:
CREATE TABLESPACE temptablespace LOCATION 'C:\Program Files\PostgreSQL/tempdb';
Now create a table in that tablespace.
Hope this helps you.
Thank you very much, that worked!!! One more question, if I create multiple temp tablespaces distributed on different disks, the document says that I can specify the same in temp_tablespaces. Do I separate the names of table space with a comma or a space. Sorry, this may sound silly, just confirming as this is a windows install.
Temporary tablespace temp_tablespaces parameter, which determines the placement of temporary tables and indexes, as well as temporary files that are used for purposes such as sorting large data sets.
This can be a list of tablespace names, rather than only one, so that the load associated with temporary objects can be spread over multiple tablespaces. A random member of the list is picked each time a temporary object is to be created.