X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 356B552A4F for ; Fri, 11 Mar 2005 03:21:57 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 59227-01 for ; Fri, 11 Mar 2005 03:21:54 +0000 (GMT) Received: from candle.pha.pa.us (candle.pha.pa.us [64.139.89.126]) by svr1.postgresql.org (Postfix) with ESMTP id 444AB52A4D for ; Fri, 11 Mar 2005 03:21:52 +0000 (GMT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id j2B3Lee22234; Thu, 10 Mar 2005 22:21:40 -0500 (EST) From: Bruce Momjian Message-Id: <200503110321.j2B3Lee22234@candle.pha.pa.us> Subject: Re: 7.4.5 file write issue In-Reply-To: <20050305122822.V83321@woozle.rinet.ru> To: Dmitry Morozovsky Date: Thu, 10 Mar 2005 22:21:40 -0500 (EST) Cc: "Chris White (cjwhite)" , pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL121 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.013 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/168 X-Sequence-Number: 16666 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