Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1THQ6D-0002vL-PM for pgsql-admin@postgresql.org; Fri, 28 Sep 2012 02:14:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1THQ6C-0002q8-M9 for pgsql-admin@postgresql.org; Fri, 28 Sep 2012 02:14:41 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q8S2EeWh010418; Thu, 27 Sep 2012 22:14:40 -0400 (EDT) From: Tom Lane To: Greg Williamson cc: "pgsql-admin@postgresql.org" Subject: Re: Database size stays constant but disk space keeps shrinking -- postgres 9.1 In-reply-to: <1348797684.2846.YahooMailNeo@web125904.mail.ne1.yahoo.com> References: <1348783559.78739.YahooMailNeo@web125906.mail.ne1.yahoo.com> <5064D7BC.1000709@pinpointresearch.com> <1348797684.2846.YahooMailNeo@web125904.mail.ne1.yahoo.com> Comments: In-reply-to Greg Williamson message dated "Thu, 27 Sep 2012 19:01:24 -0700" Date: Thu, 27 Sep 2012 22:14:39 -0400 Message-ID: <10417.1348798479@sss.pgh.pa.us> X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201209/168 X-Sequence-Number: 40109 Greg Williamson 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