1

I recently dual booted my system by installing Ubuntu over Windows. Now I have to import a file in postgresql , which is stored in host file system. The host filesystem has 190 GB of space. But when I log into postgres as sudo su postgres, it would take me into root filesystem(the default postgres folder) and query would be executed in that. Now my data set is of 3 GB and after sometime query would return 'OUT of disk space' as the root filesystem is of 3.5-4 GB. So it would be great if anyone can suggest solution to this? . Do I need to change default folder of postgres?

Thanks Ravinder

5
  • You can try create a tablespace on different path/filesystem/drive and move/ your tables there. But if you use NTFS from Ubuntu for postgres DB - you may have problems with DB performance and stability. Commented Oct 12, 2013 at 13:38
  • Or you can just expand the disc partition used by Ubuntu. Commented Oct 12, 2013 at 13:39
  • I think the OP just means that uid=postgres does not have a home directory. (it does not need one, but it's nice to have one) BTW: disk space is not restricted by user or directory (unless you have quote anabled) It is restricted by the mounted filesystems. Maybe you could add the output of df -k to your post? Commented Oct 12, 2013 at 13:43
  • Filesystem Size Used Avail Use% Mounted on /dev/loop0 3.9G 2.0G 1.7G 54% / udev 1.9G 4.0K 1.9G 1% /dev tmpfs 773M 864K 772M 1% /run none 5.0M 0 5.0M 0% /run/lock none 1.9G 156K 1.9G 1% /run/shm none 100M 44K 100M 1% /run/user /dev/sda6 196G 51G 145G 26% /host /dev/loop1 3.9G 2.0G 1.7G 55% /usr /dev/loop2 3.9G 3.7G 43M 99% /h Commented Oct 15, 2013 at 6:42
  • I think we have to increase the size of /usr or /h file system. Can anyone please explain how to accomplish that? Commented Oct 15, 2013 at 6:43

1 Answer 1

1

I'd create a new file on host, which I'd configure as a second hard drive image for your Ubuntu. And I'd use this drive to create partition there and mount it where the PGDATA directory would be.

Sign up to request clarification or add additional context in comments.

1 Comment

can you please explain more? I am new to Linux....how to configure second hard drive image?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.