X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0DFBDD8684 for ; Tue, 18 Oct 2005 12:17:45 -0300 (ADT) 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 83190-03 for ; Tue, 18 Oct 2005 15:17:42 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 0D564D8292 for ; Tue, 18 Oct 2005 12:17:41 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j9IFHet4001265; Tue, 18 Oct 2005 11:17:40 -0400 (EDT) To: "Thomas F. O'Connell" Cc: pgsql-admin@postgresql.org, Scott Marlowe Subject: Re: postmaster blues after system restart In-reply-to: <63CB9C73-F479-42AB-A86D-8353D6DE6762@sitening.com> References: <39013461-BAB8-42A1-B2C9-E03CEC6B1C12@sitening.com> <26905.1129613371@sss.pgh.pa.us> <63CB9C73-F479-42AB-A86D-8353D6DE6762@sitening.com> Comments: In-reply-to "Thomas F. O'Connell" message dated "Tue, 18 Oct 2005 00:44:37 -0500" Date: Tue, 18 Oct 2005 11:17:40 -0400 Message-ID: <1264.1129648660@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200510/211 X-Sequence-Number: 19283 "Thomas F. O'Connell" writes: > Does postgres just use /tmp because it will generally be known to > exist and be writable? I suppose that was the original motivation. We've had repeated troubles over the years with using /tmp --- for example, the code now goes to considerable lengths to update the socket's timestamp periodically so that it won't be seen as a target by scripts that clean out /tmp entries more than X minutes old. It's really not very feasible to change the standard default, though, because that would break too many clients (it's not very different from changing the default port number). There's also the small problem that there is no good alternative choice; there is no other fixed directory path that can be assumed writable by a non-privileged postmaster on every Unix. So I'm afraid we're stuck with /tmp as the default socket location. In any case, I don't think there's much doubt that unconditionally cleaning out /tmp *after* beginning to start daemons is simply broken. That script has no excuse whatever for thinking that there can't be some other process actually using /tmp at the time it's running. If you're going to have a forcible cleanout of /tmp during reboot, it has to happen before the /etc/rc.d scripts begin to run. regards, tom lane