dbTalk Databases Forums  

Can't create lock file /tmp/.s.PGSQL.5432.lock

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss Can't create lock file /tmp/.s.PGSQL.5432.lock in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Patrice Durosay
 
Posts: n/a

Default Can't create lock file /tmp/.s.PGSQL.5432.lock - 12-18-2003 , 11:57 AM






Hi all

Running postgres under RedHat9, I moved the /tmp partition to / and copied the /usr into a much larger one in order to get more disk space for programs . Hope I did not loose any file.

One of the problems is that postgre dont start. I Followed the /etc/init.d/postgresql script. It crashes at the line

su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster -o '-p ${PGPORT}' start "


with message

:FATAL: Can't create lock file /tmp/.s.PGSQL.5432.lock: Permission denied

and the erroneous one

postmaster successfully started

I can understand that the user postgresostgres cannot write in the /tmp directorythat belong to root:root (as usual), but it worked before.
A precision, I have no .s.PGSQL.5432 file in the /tmp directory.

srwxrwxrwx 1 postgres postgres 0 Dec 11 14:01 ./.s.PGSQL.543


Have any suggestion so that I can rstart the postmaster ?
Should I reinstall postgresql and is it a great risk ?

Cordially

Patrice Durosay




---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
  #2  
Old   
Bruno LEVEQUE
 
Posts: n/a

Default Re: Can't create lock file /tmp/.s.PGSQL.5432.lock - 12-18-2003 , 02:03 PM






Hi

The right on /tmp must be : drwxrwxrwt and owner : root, group : root

Are they ?



Patrice Durosay wrote:

Quote:
Hi all

Running postgres under RedHat9, I moved the /tmp partition to / and copied the /usr into a much larger one in order to get more disk space for programs . Hope I did not loose any file.

One of the problems is that postgre dont start. I Followed the /etc/init.d/postgresql script. It crashes at the line

su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster -o '-p ${PGPORT}' start "


with message

:FATAL: Can't create lock file /tmp/.s.PGSQL.5432.lock: Permission denied

and the erroneous one

postmaster successfully started

I can understand that the user postgresostgres cannot write in the /tmp directorythat belong to root:root (as usual), but it worked before.
A precision, I have no .s.PGSQL.5432 file in the /tmp directory.

srwxrwxrwx 1 postgres postgres 0 Dec 11 14:01 ./.s.PGSQL.543


Have any suggestion so that I can rstart the postmaster ?
Should I reinstall postgresql and is it a great risk ?

Cordially

Patrice Durosay




---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



--
Bruno LEVEQUE
System Engineer
SARL NET6D
bruno.leveque (AT) net6d (DOT) com
http://www.net6d.com



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html



Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: Can't create lock file /tmp/.s.PGSQL.5432.lock - 12-18-2003 , 02:03 PM



Patrice Durosay <patrice.durosay (AT) cgm (DOT) cnrs-gif.fr> writes:
Quote:
Running postgres under RedHat9, I moved the /tmp partition to / and copied the /usr into a much larger one in order to get more disk space for programs . Hope I did not loose any file.

:FATAL: Can't create lock file /tmp/.s.PGSQL.5432.lock: Permission denied
You forgot to give the new /tmp directory the correct permissions.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Reply With Quote
  #4  
Old   
Patrice Durosay
 
Posts: n/a

Default Re: Can't create lock file /tmp/.s.PGSQL.5432.lock - 12-19-2003 , 03:23 AM



Hello,

Many thanks to Bruno Leveque and Tom Lane for your sharp answers :

Quote:
You forgot to give the new /tmp directory the correct permissions.

The right on /tmp must be : drwxrwxrwt and owner : root, group : root
My permissions were false
drwxr-xr-x

chmod 1777 /tmp

restored the right ones

drwxrwxrwt 6 root root 1024 déc 19 10:56 tmp

postgresql starts, xfs also and certainly a lot of other problems are avoided

Cheers

Patrice


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.