I can successfully create a ramdisk for a PostgreSQL database.
This command is successful:
psql --host=localhost --command "CREATE TABLESPACE $db_tblspace LOCATION '$dbPath';"
where dbPath is a directory on the ramdisk.
Here:
createdb $dbName --tablespace=$db_tblspace --host=localhost --no-password --echo
I get this error:
CREATE DATABASE pgdb TABLESPACE pgdb_tblspace;
createdb: database creation failed: ERROR: could not write to file "pg_tblspc/24597/PG_9.2_201204301/24598/12027": No space left on device
I cannot understand this error. The ramdisk has just been created, it is empty and its size is 50 MB. The newly created database is also empty. Why the message "No space left on device"?
Thank you.