Re: Postmaster holding unlinked files for pg_largeobject table

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Alexander Shulgin <ash(at)commandprompt(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, alexk <alexk(at)commandprompt(dot)com>
Subject: Re: Postmaster holding unlinked files for pg_largeobject table
Date: 2011-06-04 01:32:56
Message-ID: 1307150981-sup-5744@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Excerpts from Alexander Shulgin's message of vie jun 03 17:45:28 -0400 2011:

> There were about 450 such (or similar) files, all of them having /2613 in the filename. Since 2613 is a regclass of pg_largeobject and we are indeed working with quite a few large objects in that DB so this is where our problem lies we suspect.
>
> Restarting PostgreSQL obviously helps the issue and the disk space occupied by those unlinked files (about 63GB actually) is reclaimed.
>
> So what happens on that host is that we drop/restore a fresh version of the DB from the production host, followed by a migration script which among other things loads around 16GB of data files as large objects. This happens nightly.

What surprises me is that the open references remain after a database
drop. Surely this means that no backends keep open file descriptors to
any table in that database, because there are no connections.

I also requested Alexander to run a checkpoint and see if that made the
FDs go away (on the theory that bgwriter could be the culprit) -- no dice.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message CSS 2011-06-04 03:38:38 Tuning for a tiny database
Previous Message John R Pierce 2011-06-03 22:44:47 Re: Need suggestion

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2011-06-04 02:12:10 Re: Remove support for 'userlocks'?
Previous Message Alvaro Herrera 2011-06-04 01:04:46 Re: creating CHECK constraints as NOT VALID