Get the current free disk space in PostgreSQL PostgreSQL获取磁盘空间 from eshizhan Here has a simple way to get free disk space without any extended language, just define a function using pgsql. CREATE OR REPLACE FUNCTION sys_df() RETURNS SETOF text[] LANG