Re: 7.4.5 file write issue - Mailing list pgsql-admin

From Bruce Momjian
Subject Re: 7.4.5 file write issue
Date
Msg-id 200503110321.j2B3Lee22234@candle.pha.pa.us
Whole thread Raw
In response to Re: 7.4.5 file write issue  (Dmitry Morozovsky <marck@rinet.ru>)
Responses Re: 7.4.5 file write issue  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-admin by date:

Previous
From: Alex Turner
Date:
Subject: Re: IO Timeout
Next
From: Tom Lane
Date:
Subject: Re: IO Timeout