pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas F. O'Connell <tfo@sitening.com>
Cc: pgsql-admin@postgresql.org, Scott Marlowe <smarlowe@g2switchworks.com>
Subject: Re: postmaster blues after system restart
Date: Tue, 18 Oct 2005 11:17:40 -0400
Message-ID: <1264.1129648660@sss.pgh.pa.us> (raw)
In-Reply-To: <63CB9C73-F479-42AB-A86D-8353D6DE6762@sitening.com>
References: <C8A515DC-317B-4051-9F6E-97DCCFF87380@sitening.com>
	<39013461-BAB8-42A1-B2C9-E03CEC6B1C12@sitening.com>
	<26905.1129613371@sss.pgh.pa.us>
	<63CB9C73-F479-42AB-A86D-8353D6DE6762@sitening.com>

"Thomas F. O'Connell" <tfo@sitening.com> 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



view thread (12+ messages)

Message-ID: <1264.1129648660@sss.pgh.pa.us>
Permalink:  ../1264.1129648660@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1264.1129648660@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tfo@sitening.com, smarlowe@g2switchworks.com
  Subject: Re: postmaster blues after system restart
  In-Reply-To: <1264.1129648660@sss.pgh.pa.us>
  References: <C8A515DC-317B-4051-9F6E-97DCCFF87380@sitening.com> <39013461-BAB8-42A1-B2C9-E03CEC6B1C12@sitening.com> <26905.1129613371@sss.pgh.pa.us> <63CB9C73-F479-42AB-A86D-8353D6DE6762@sitening.com> <1264.1129648660@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox