Re: walwriter not closing old files

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: magnus(at)hagander(dot)net, pgsql-hackers(at)postgresql(dot)org
Subject: Re: walwriter not closing old files
Date: 2010-06-09 12:12:50
Message-ID: 4C0F8542.6020007@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09/06/10 15:04, Kevin Grittner wrote:
> Magnus Hagander wrote:
>> The way to provoke the problem is:
>
> The way I ran into it was to have a web application which only ran
> read-only transactions. Sooner or later it would need to write a
> page from the buffer to make space to read a new page, and then it
> would forever be holding a WAL file open, even after it was deleted.
>
> Previous thread on the topic starts here:
>
> http://archives.postgresql.org/pgsql-hackers/2009-11/msg01754.php
>
> continuing here:
>
> http://archives.postgresql.org/pgsql-hackers/2009-12/msg00060.php
>
> Resulting in a TODO listed with this description:
>
> Close deleted WAL files held open in *nix by long-lived read-only
> backends

This patch only helps with walwriter, though, not backends. Your
scenario is probably even more common, but will need a different fix.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Cramer 2010-06-09 12:24:39 Re: pgstatindex still throws ERROR: value "3220078592" is out of range for type integer
Previous Message Magnus Hagander 2010-06-09 12:12:06 Re: walwriter not closing old files