pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas F. O'Connell <tfo@sitening.com>
To: pgsql-admin@postgresql.org
Cc: Scott Marlowe <smarlowe@g2switchworks.com>
Subject: Re: postmaster blues after system restart
Date: Mon, 17 Oct 2005 23:17:49 -0500
Message-ID: <39013461-BAB8-42A1-B2C9-E03CEC6B1C12@sitening.com> (raw)
In-Reply-To: <C8A515DC-317B-4051-9F6E-97DCCFF87380@sitening.com>
References: <C8A515DC-317B-4051-9F6E-97DCCFF87380@sitening.com>

Well, after digging a bit deeper, I guess the conclusion is that the  
best practice is to trust package maintainers and follow their lead  
when installing from source.

I notice, for instance, that contrib/start-scripts/linux recommends  
S98 for /etc/rc. That wouldn't've prevented the S99 mountnfs.sh foul- 
up, but it would've prevented it had mountnfs.sh been at its  
(apparent) default of S45.

And the problem that bit me looks only to have been an issue when  
used in conjunction with postgres when built from source on Debian,  
as Debian seems to prefer /var/run/postgresql for its socket  
directory, thereby avoiding the issue with /tmp altogether.

So either by following the guidance of contrib/start-scripts/linux or  
the postgresql package for Debian, the problem is alleviated.

But cleaning out /tmp seems to be a part of institutional practice on  
Linux, so it still seems like something about that deserves mention  
somewhere in the postgres documentation since the default for  
unix_socket_directory is /tmp.

--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC

Open Source Solutions. Optimized Web Development.

http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-469-5150
615-469-5151 (fax)

On Oct 17, 2005, at 6:36 PM, Thomas F. O'Connell wrote:

> On Fri, 2005-10-14 at 15:49, Thomas F. O'Connell wrote:
>
>>> The culprit that ended up leading to my original post was an NFS
>>> script that cleans out /tmp. It was running as the last thing in a
>>> given boot level, so it blew away the socket file in /tmp.
>>
>> I'm sure you already know this, but wildly / randomly deleting  
>> things in
>> /tmp is a bad idea...
>
> Well, here's the story. It was a Debian box, and somehow,  
> mountnfs.sh wound up at S99 in /etc/rc2.d. I'm not sure how that  
> happened, but it raises some potential questions:
>
> Converting this to a PostgreSQL on Debian question: is it a good  
> admin practice to go ahead and set TMPTIME=-1 in /etc/default/rcS  
> on Debian servers running postgres?
>
> If the answer is "yes", then it becomes a more purely Debian  
> question: what are the ramifications of not cleaning out /tmp at  
> boot using initscripts?
>
> More widely: are there other non-Debian-based distributions that  
> have a similar facility for wiping /tmp at boot? Is changing the  
> timing easy? Is the disabling mechanism the same?
>
> Maybe not having seen too many prior instances of this particular  
> issue is a good sign that no one is obliterating the contents of / 
> tmp after postgres has started, but the fact that Debian has tools  
> in initscripts that seek to clean out /tmp this makes me think a  
> mention of this in the PostgreSQL documentation might be a good  
> idea (perhaps in 14.6: Post-Installation Setup?).
>
> But I'd be curious to know the perspective of other Debian/ 
> PostgreSQL admins on where they think the issue really lies or even  
> whether there is a perceived issue.



view thread (12+ messages)  latest in thread

Message-ID: <39013461-BAB8-42A1-B2C9-E03CEC6B1C12@sitening.com>
Permalink:  ../39013461-BAB8-42A1-B2C9-E03CEC6B1C12@sitening.com/
Also on:    postgresql.org/message-id/39013461-BAB8-42A1-B2C9-E03CEC6B1C12@sitening.com

 · 

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: tfo@sitening.com, smarlowe@g2switchworks.com
  Subject: Re: postmaster blues after system restart
  In-Reply-To: <39013461-BAB8-42A1-B2C9-E03CEC6B1C12@sitening.com>
  References: <C8A515DC-317B-4051-9F6E-97DCCFF87380@sitening.com> <39013461-BAB8-42A1-B2C9-E03CEC6B1C12@sitening.com>

* 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