This is where you use a LIUNX command to view disk space
Df:disk Free http://www.cnblogs.com/chenwenbiao/archive/2011/08/07/2129831.html
Common parameters: Df-h
-------------------------------------
1. Restart the Postgre under Linux
Pg_ctl Restart (postgres user)
Today's problems
Because the data is imported, the database keeps generating backup files, which fills up the space
Cannot continue to boot.
Workaround:
The directory structure where the backup files reside
Root
Databases
Archieves
Data
Pg_xlog
Archive_status
(archieves archives; documents; records)
Delete the data backup files below these directories
-------------------------------------------------------------------------------
Error Phenomenon
Execute pg_ctl Restart command
Error
Could not change directory to "/root"
Pg_ctl:pid file "/database/data/postmaster.pid" does not exist
the reason for this problem arises
Not because the directory does not have this file, but because the disk space is too small
When the process executes, there is not enough room to read the file.
Use the Postgres user to execute the following command
Df-h can view the usage of the database's space
FileSystem size used avail use% mounted on
/dev/sda3 70 70 0 100/
The process does not have enough space to run, so there are errors above
----------------------------------------------------
problem arises
Inserting data into the postgre using stored procedures
Inserts 100,000 data at a time, resulting in more than n backup files in those directories above
These backup files consume a lot of disk space
When this batch command is last executed
Console error, said that there is not enough disk space, then this side will no longer connect to the database
View the process and discover that the Postgre process has stopped
When you reboot, you report the error above.
Could not change directory to "/root"
Pg_ctl:pid file "/database/data/postmaster.pid" does not exist
----------------------------------------
Note:
What's eating the disk space?
Is the huge amount of disk space that the backup file eats up.
In fact, that millions of data does not occupy how much disk space