Re: 7.4.5 file write issue

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Dmitry Morozovsky <marck(at)rinet(dot)ru>
Cc: "Chris White (cjwhite)" <cjwhite(at)cisco(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: 7.4.5 file write issue
Date: 2005-03-11 03:21:40
Message-ID: 200503110321.j2B3Lee22234@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Dmitry Morozovsky wrote:
> On Tue, 22 Feb 2005, Chris White (cjwhite) wrote:
>
> CWc> We are noticing on our 7.4.5 system the following files are being written
> CWc> approximately every 5 minutes
> CWc>
> CWc> /tmp/.s.PGSQL.5432
> CWc> /tmp/.s.PGSQL.5432.lock
> CWc>
> CWc> Anybody know why they are being written? The reason I ask is because we are
> CWc> running on a system that uses a laptop disk drive and requires at least 10
> CWc> minutes idle time to spindown so it can recalibrate. This did not happen
> CWc> when we were running 7.4.2, so does anybody have any idea what may have
> CWc> changed between 7.4.2 and 7.4.5 to cause this to happen.
>
> What about switching to memory-based /tmp ?

If you take a look at postmaster.c you will see:

/*
* Touch the socket and lock file at least every ten minutes, to
* ensure that they are not removed by overzealous /tmp-cleaning
* tasks.
*/
now = time(NULL);
if (now - last_touch_time >= 10 * 60)
{
TouchSocketFile();
TouchSocketLockFile();
last_touch_time = now;
}

I would change the "10" to perhaps "60" and try that.

I am now thinking we need to make this "10" a GUC variable for just such
cases. This is not the first request for this.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2005-03-11 04:09:07 Re: IO Timeout
Previous Message Alex Turner 2005-03-11 02:19:19 Re: IO Timeout