pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>
Cc: eduardoa@mirthcorp.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #8612: Truncate did not release disk space
Date: Fri, 22 Nov 2013 14:56:36 -0500
Message-ID: <24305.1385150196@sss.pgh.pa.us> (raw)
In-Reply-To: <528FAC9A.6010801@kaltenbrunner.cc>
References: <E1VjDYO-0003Cl-Vo@wrigleys.postgresql.org>
	<528FAC9A.6010801@kaltenbrunner.cc>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Stefan Kaltenbrunner <stefan@kaltenbrunner.cc> writes:
> On 11/20/2013 08:35 PM, eduardoa@mirthcorp.com wrote:
>> The following bug has been logged on the website:
>> 
>> Bug reference:      8612
>> Logged by:          Eduardo Armendariz
>> Email address:      eduardoa@mirthcorp.com
>> PostgreSQL version: 9.0.13
>> Operating system:   CentOS
>> Description:        
>> 
>> Ran out of disk space and postgres shut down. Recovered enough disk space
>> for database to be operational. Truncated the largest table in the database,
>> the message table. This table had over 600gb of data. The result of the
>> truncate was that only about 200gb of the data was actually released to the
>> OS. 

> sure that no other backend was/is actually still a file-handle
> referenced? That open filehandle will prevent the OS from showing up the
> freed space on the filesystem and can happen if you have backends still
> running that once referenced the table now truncated and have not done
> any work since you did the truncate (like a large connection pool or
> idle client connections, maybe an open psql session or something like that).

I think recent versions of PG contain logic that should ensure such open
handles will be released within a reasonable period of time (like one
checkpoint cycle).  9.0 I wouldn't bet on, though.  If nothing else, a
quick shutdown-and-restart of the database should release the space.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (5+ messages)  latest in thread

Message-ID: <24305.1385150196@sss.pgh.pa.us>
Permalink:  ../24305.1385150196@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/24305.1385150196@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, stefan@kaltenbrunner.cc, eduardoa@mirthcorp.com
  Subject: Re: BUG #8612: Truncate did not release disk space
  In-Reply-To: <24305.1385150196@sss.pgh.pa.us>
  References: <E1VjDYO-0003Cl-Vo@wrigleys.postgresql.org> <528FAC9A.6010801@kaltenbrunner.cc> <24305.1385150196@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox