User Tools

Site Tools


ramfs_based_table_space

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ramfs_based_table_space [2012/03/23 19:40]
k2patel [Automating the process]
ramfs_based_table_space [2012/03/23 19:42]
k2patel [Summary]
Line 8: Line 8:
  
  
-    ​Tablespaces in PostgreSQL allow database administrators to define locations in the file system where the files \\ +Tablespaces in PostgreSQL allow database administrators to define locations in the file system where the files \\ 
-    representing database objects can be stored. Once created, a tablespace can be referred to by name when creating \\ +representing database objects can be stored. Once created, a tablespace can be referred to by name when creating \\ 
-    database objects.The location must be an existing, empty directory that is owned by the PostgreSQL system user. \\ +database objects.The location must be an existing, empty directory that is owned by the PostgreSQL system user. \\ 
-    All objects subsequently created within the tablespace will be stored in files underneath this directory. \\ +All objects subsequently created within the tablespace will be stored in files underneath this directory. \\ 
-    Creation of the tablespace itself must be done as a database superuser, but after that you can allow ordinary \\ +Creation of the tablespace itself must be done as a database superuser, but after that you can allow ordinary \\ 
-    database users to make use of it. To do that, grant them the CREATE privilege on it. +database users to make use of it. To do that, grant them the CREATE privilege on it. 
  
 First create the directory where tablespace will be stored. It must reside on your ramfs filesystem. First create the directory where tablespace will be stored. It must reside on your ramfs filesystem.
Line 82: Line 82:
  
 <code bash> <code bash>
-         pg_dump --create --schema-only --file=/​root/​memdb.sql --host=localhost -U postgres memdb+  ​pg_dump --create --schema-only --file=/​root/​memdb.sql --host=localhost -U postgres memdb
 </​code> ​         </​code> ​        
  
-    ​Stop postmaster (original init code) +Stop postmaster (original init code) 
-    Unmount ramfs: +== Unmount ramfs: ​== 
-    +   ​
 <code bash> <code bash>
          ​umount /mnt/ramfs          ​umount /mnt/ramfs
Line 136: Line 136:
 You have just learned how to set up memory storage for the PostgreSQL database server. \\ You have just learned how to set up memory storage for the PostgreSQL database server. \\
  
 +[[http://​magazine.redhat.com/​2007/​12/​12/​tip-from-an-rhce-memory-storage-on-postgresql/​ | Referance]]
ramfs_based_table_space.txt · Last modified: 2020/08/10 02:35 (external edit)