Re: Database size stays constant but disk space keeps shrinking -- postgres 9.1 - Mailing list pgsql-admin

From Micky Gough
Subject Re: Database size stays constant but disk space keeps shrinking -- postgres 9.1
Date
Msg-id CAPWZr2d=CYjfFUjcaiyVRwyJvpZ4pz4viTsiYCX4Tb3ZHr316A@mail.gmail.com
Whole thread Raw
In response to Database size stays constant but disk space keeps shrinking -- postgres 9.1  (Greg Williamson <gwilliamson39@yahoo.com>)
List pgsql-admin
Hi Greg,

On Fri, Sep 28, 2012 at 8:05 AM, Greg Williamson <gwilliamson39@yahoo.com> wrote:

I have a postgres database, 9.1.3, which shows a fairly constant amount of space used by postgres, but total disk space kees shrinking.
If I restart postgres the space on my file system returns.

It sounds like (maybe?) Postgres is writing to a file that has been deleted. You won't be able to see the file using ls, so it's hard to track. Restarting postgres will release the lock on the inode and the filesystem flushes it.

You can check for deleted files that are being held open using lsof |grep deleted.

Micky

pgsql-admin by date:

Previous
From: Steve Crawford
Date:
Subject: Re: Database size stays constant but disk space keeps shrinking -- postgres 9.1
Next
From: Dinesh Bhandary
Date:
Subject: Re: Database size stays constant but disk space keeps shrinking -- postgres 9.1