Re: [GENERAL] Socket file lock

From: ^chewie <chewie(at)wookimus(dot)net>
To: Fabian(dot)Frederick(at)prov-liege(dot)be
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Socket file lock
Date: 1999-11-23 18:01:32
Message-ID: Pine.LNX.4.10.9911231154180.6016-100000@guinness.urw.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 23 Nov 1999 Fabian(dot)Frederick(at)prov-liege(dot)be wrote:

> Sometimes I've got some core socket file in /tmp.However Postgres
> leaved correctly in previous shutdown : / What would be the best way
> to avoid this. (The big big problem is that postmaster can't be
> launched due to that core).

I am not versed in the mannerisms or options of Postgresql quite yet, so
bear with me if there is another more suited approach to this problem.
If you're talking about a /tmp file, you are obviously running this on a
*NIX based system. I use Debian Linux, so my background with the
scripts to launch Postgresql stem from my familiarity with this
distribution, and subsequently the SysV standard for init.d scripts.

To launch Postgresql, I use the script found in /etc/init.d. I have
found it a fairly nominal task to include a 'cleanup()' function in the
init.d script. Something to the effect of:

#!/bin/sh

cleanup() {
for i in /tmp/<insert string match for socket file> ; do
rm -rf ${i}
done
}

This you can include as the first line under each of the case statements
of start, stop, restart, reload, etc...

^chewie

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jochen Topf 1999-11-23 18:18:46 Re: Is PostgreSQL ready for mission critical applications?
Previous Message Bruce Momjian 1999-11-23 17:40:35 Re: [GENERAL] Re: Is PostgreSQL ready for ...