Martin Pitt wrote:

>Hi Adam!
>
>Adam Majer [2005-06-16 17:54 -0500]:
>  
>
>>Package: postgresql-common
>>Version: 17
>>Severity: normal
>>
>>[EMAIL PROTECTED]:/$  sudo /etc/init.d/postgre* start
>>Starting PostgreSQL 8.0 database server: main(FAILED)
>>
>>The PostgreSQL server failed to start. Please check the log output:
>>LOG:  database system was shut down at 2005-06-16 17:50:36 CDT
>>LOG:  checkpoint record is at 0/5EC6A24
>>LOG:  redo record is at 0/5EC6A24; undo record is at 0/0; shutdown TRUE
>>LOG:  next transaction ID: 25244; next OID: 61232
>>LOG:  database system is ready
>>
>>But, the database is running.
>>    
>>
>>Also, if I try to execute the script from a directory not accessible to
>>postgres user, I get messages like "count not change to directory foo".
>>    
>>
>
>Hm, that doesn't happen for me. Can you give me a recipe how to
>reproduce that?
>  
>

First, regarding the "could not change directory to foo",

[EMAIL PROTECTED]:/tmp$ mkdir t
[EMAIL PROTECTED]:/tmp$ chmod 700 t
[EMAIL PROTECTED]:/tmp$ cd t
[EMAIL PROTECTED]:/tmp/t$ ls -lta
total 12
drwx------   2 adamm adamm 4096 2005-06-17 10:57 .
drwxrwxrwt  28 root  root  8192 2005-06-17 10:57 ..
[EMAIL PROTECTED]:/tmp/t$ sudo /etc/init.d/postgres* restart
Password:
Restarting PostgreSQL 8.0 database server: main(FAILED)

could not change directory to "/tmp/t"
could not change directory to "/tmp/t"
pg_ctl: another postmaster may be running; trying to start postmaster anyway
pg_ctl: could not start postmaster
Examine the log output.
The PostgreSQL server failed to start. Please check the log output:
FATAL:  lock file "/var/lib/postgresql/8.0/main/postmaster.pid" already
exists
HINT:  Is another postmaster (PID 2990) running in data directory
"/var/lib/postgresql/8.0/main"?




And about the detection of failure, well, PostgreSQL starts in a second
or so so that is not the problem. The problem is that there is no socket
created. Ever since I installed postgresql 8.0 I could not connect with
a simple psql..

[EMAIL PROTECTED]:~$ psql
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket
"/var/run/postgresql/.s.PGSQL.5432"?

The directory seems to have correct permissions,

[EMAIL PROTECTED]:/var/run/postgresql$ ls -al
total 8
drwxrwxr-x   2 postgres postgres 4096 2005-05-28 13:01 .
drwxr-xr-x  11 root     root     4096 2005-06-16 12:35 ..

the server is running, but no socket.

Where is the path to the local socket set? That is, should the socket be
created by default? The configuration file has the socket path commented
and I told it to listen on 127.0.0.1 and ::1.

- Adam

PS. I found the socket in /tmp

srwxrwxrwx   1 postgres postgres         0 2005-06-17 11:02 .s.PGSQL.5432
-rw-------   1 postgres postgres        34 2005-06-17 11:02
.s.PGSQL.5432.lock

Hmmm.. The original installation was from experimental but now I'm up to
date AFAICT,

[EMAIL PROTECTED]:/etc/postgresql$ apt-cache policy postgresql-8.0
postgresql-8.0:
  Installed: 8.0.3-5
  Candidate: 8.0.3-5
postgresql-common:
  Installed: 17
  Candidate: 17




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to