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: "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 02:14:39
Message-ID: 10417.1348798479@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
Greg Williamson <gwilliamson39(at)yahoo(dot)com> writes:
>> Have you checked to see if there are any processes that have open handles to
>> deleted files (lsof -X | grep deleted).

> lsof -X | grep deleted | wc -l

> shows: 835 such files.

> A couple:
> postgres   2540 postgres   50u      REG                8,3     409600      93429 /var/lib/postgresql/9.1/main/base/2789
> 200/11816 (deleted)
> postgres   2540 postgres   51u      REG                8,3   18112512   49694570 /var/lib/postgresql/9.1/main/base/2789
> 200/2791679 (deleted)
> <...>

So, which processes are holding these open, and what are they doing
exactly?  Let's see output from ps and pg_stat_activity, maybe even
attach to them with gdb and get stack traces.

> We've a planned restart scheduled soon which will let me find any
> scripts that might be keeping things open,

A restart will destroy all the evidence, so let's not be in a hurry
to do that before we've identified what's happening.

			regards, tom lane


In response to

Responses

pgsql-admin by date

Next:From: Dinesh BhandaryDate: 2012-09-28 02:19:51
Subject: Re: Database size stays constant but disk space keeps shrinking -- postgres 9.1
Previous:From: Greg WilliamsonDate: 2012-09-28 02:01:24
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