Skip site navigation (1) Skip section navigation (2)

Re: Database size stays constant but disk space keeps shrinking -- postgres 9.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Williamson <gwilliamson39(at)yahoo(dot)com>
Cc: Steve Crawford <scrawford(at)pinpointresearch(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Database size stays constant but disk space keeps shrinking -- postgres 9.1
Date: 2012-09-28 23:49:09
Message-ID: 18017.1348876149@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
Greg Williamson <gwilliamson39(at)yahoo(dot)com> writes:
>> I'll leave it to you and Tom to puzzle over the the postgres-related open 
>> files. Meanwhile, I'm a bit curious about the other 800+ and whether they 
>> are associated with scripts or processes that are connected to PostgreSQL.

> These all seem to be from two places -- repmgr (transient ) and this stats application.

Do you have any characterization yet of which deleted files are being
held open by which processes?  In particular I'm wondering if the
held-open deleted files are in a recently-dropped database, and whether
they are being held open by regular backends or one of the background
processes such as bgwriter, and if the former what are those backends
doing exactly.

It's entirely expected that recently-deleted files might be held open
for a little while, but there are mechanisms that are supposed to
prevent them from being held open indefinitely.  I'm guessing that your
usage pattern might be tripping over some gap in those mechanisms, but
we don't have enough info yet to speculate about what.

BTW, I now think that my question about the unexpected OID value shown
for one deleted file may have been a red herring --- it seems not
implausible that lsof was just lying to you.  It has to do some
guesswork to reconstruct file paths for deleted files, and I don't think
it's always right about that.

			regards, tom lane


In response to

pgsql-admin by date

Next:From: Greg WilliamsonDate: 2012-10-01 21:37:20
Subject: Re: Database size stays constant but disk space keeps shrinking -- postgres 9.1
Previous:From: Greg WilliamsonDate: 2012-09-28 22:47:52
Subject: Re: Database size stays constant but disk space keeps shrinking -- postgres 9.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group