pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
postmaster.pid file
6+ messages / 3 participants
[nested] [flat]

* postmaster.pid file
@ 2007-08-13 21:51 Tena Sakai <tsakai@gallo.ucsf.edu>
  2007-08-13 22:37 ` Re: postmaster.pid file Tom Lane <tgl@sss.pgh.pa.us>
  2007-08-14 15:15 ` Re: postmaster.pid file Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 2 replies; 6+ messages in thread

From: Tena Sakai @ 2007-08-13 21:51 UTC (permalink / raw)
  To: pgsql-admin

Hi Everybody,

I experienced something a bit strange.
When I issued, on a linux machine, the following
command as user postgres:
    ~/bin/pg_ctl -D ~/bin reload
It wasn't happy.  The complaint was:
    pg_ctl: PID file "/usr/local/pgsql/bin/postmaster.pid" does not exist
    Is server running?

Upon checking, I discovered that the file postmaster.pid was
in data directory and as I copied it into ~/bin directory (and
changed the ownership and permission appropriately), it sent
the HUP signal to the server process and all was well.  I am
sure I have issued this command before and never had problems
like today.

Question 1:
  What happened?
  Did I do the right thing?  If not, please tell me what I
  should've and could've done.

Question 2:
  As I looked at the pid file, there were three lines.  The
  first line seemed like the pid of the server process.  The
  second line indicates where the database cluster resides.
  In my case it is /usr/local/pgsql/data.  The last line has
  two numbers.  In my case they are: 5432001 and 131072.
  What do they represent?  I don't seem to have processes
  by such id.

Thank you in advance.

Regards,

Tena Sakai
tsakai@gallo.ucsf.edu

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: postmaster.pid file
  2007-08-13 21:51 postmaster.pid file Tena Sakai <tsakai@gallo.ucsf.edu>
@ 2007-08-13 22:37 ` Tom Lane <tgl@sss.pgh.pa.us>
  2007-08-13 22:57   ` Re: postmaster.pid file Tena Sakai <tsakai@gallo.ucsf.edu>
  1 sibling, 1 reply; 6+ messages in thread

From: Tom Lane @ 2007-08-13 22:37 UTC (permalink / raw)
  To: Tena Sakai <tsakai@gallo.ucsf.edu>; +Cc: pgsql-admin

"Tena Sakai" <tsakai@gallo.ucsf.edu> writes:
> When I issued, on a linux machine, the following
> command as user postgres:
>     ~/bin/pg_ctl -D ~/bin reload
> It wasn't happy.

As well it shouldn't be.  -D is supposed to specify the data directory,
not the place where the executables are.

> Upon checking, I discovered that the file postmaster.pid was
> in data directory and as I copied it into ~/bin directory (and
> changed the ownership and permission appropriately),

That was a bad idea; you'll have to delete it from there manually.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: postmaster.pid file
  2007-08-13 21:51 postmaster.pid file Tena Sakai <tsakai@gallo.ucsf.edu>
  2007-08-13 22:37 ` Re: postmaster.pid file Tom Lane <tgl@sss.pgh.pa.us>
@ 2007-08-13 22:57   ` Tena Sakai <tsakai@gallo.ucsf.edu>
  2007-08-13 23:21     ` Re: postmaster.pid file Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 6+ messages in thread

From: Tena Sakai @ 2007-08-13 22:57 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

Thank you, Tom.

As I typed:
    ~/bin/pg_ctl -D ~/bin reload

I thought I had typed:
    ~/bin/pg_ctl -D ~/data reload

(Had I not copied-and-pasted the actual command,
I would have given you the correct line, which
would have been really bad!)  I was blind!

I got the extra file in ~/bin directory removed.

Regards,

Tena
tsakai@gallo.ucsf.edu

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Mon 8/13/2007 3:37 PM
To: Tena Sakai
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] postmaster.pid file 
 
"Tena Sakai" <tsakai@gallo.ucsf.edu> writes:
> When I issued, on a linux machine, the following
> command as user postgres:
>     ~/bin/pg_ctl -D ~/bin reload
> It wasn't happy.

As well it shouldn't be.  -D is supposed to specify the data directory,
not the place where the executables are.

> Upon checking, I discovered that the file postmaster.pid was
> in data directory and as I copied it into ~/bin directory (and
> changed the ownership and permission appropriately),

That was a bad idea; you'll have to delete it from there manually.

			regards, tom lane

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: postmaster.pid file
  2007-08-13 21:51 postmaster.pid file Tena Sakai <tsakai@gallo.ucsf.edu>
  2007-08-13 22:37 ` Re: postmaster.pid file Tom Lane <tgl@sss.pgh.pa.us>
  2007-08-13 22:57   ` Re: postmaster.pid file Tena Sakai <tsakai@gallo.ucsf.edu>
@ 2007-08-13 23:21     ` Tom Lane <tgl@sss.pgh.pa.us>
  2007-08-14 15:31       ` Re: postmaster.pid file Tena Sakai <tsakai@gallo.ucsf.edu>
  0 siblings, 1 reply; 6+ messages in thread

From: Tom Lane @ 2007-08-13 23:21 UTC (permalink / raw)
  To: Tena Sakai <tsakai@gallo.ucsf.edu>; +Cc: pgsql-admin

"Tena Sakai" <tsakai@gallo.ucsf.edu> writes:
> As I typed:
>     ~/bin/pg_ctl -D ~/bin reload
> I thought I had typed:
>     ~/bin/pg_ctl -D ~/data reload

I recommend setting up PGDATA as an environment variable, so you never
have to type it at all ...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: postmaster.pid file
  2007-08-13 21:51 postmaster.pid file Tena Sakai <tsakai@gallo.ucsf.edu>
  2007-08-13 22:37 ` Re: postmaster.pid file Tom Lane <tgl@sss.pgh.pa.us>
  2007-08-13 22:57   ` Re: postmaster.pid file Tena Sakai <tsakai@gallo.ucsf.edu>
  2007-08-13 23:21     ` Re: postmaster.pid file Tom Lane <tgl@sss.pgh.pa.us>
@ 2007-08-14 15:31       ` Tena Sakai <tsakai@gallo.ucsf.edu>
  0 siblings, 0 replies; 6+ messages in thread

From: Tena Sakai @ 2007-08-14 15:31 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

Hi Tom,

An excellent suggestion and I've just done it.
Many thanks.

Tena Sakai
tsakai@gallo.ucsf.edu


-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Mon 8/13/2007 4:21 PM
To: Tena Sakai
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] postmaster.pid file 
 
"Tena Sakai" <tsakai@gallo.ucsf.edu> writes:
> As I typed:
>     ~/bin/pg_ctl -D ~/bin reload
> I thought I had typed:
>     ~/bin/pg_ctl -D ~/data reload

I recommend setting up PGDATA as an environment variable, so you never
have to type it at all ...

			regards, tom lane

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: postmaster.pid file
  2007-08-13 21:51 postmaster.pid file Tena Sakai <tsakai@gallo.ucsf.edu>
@ 2007-08-14 15:15 ` Peter Eisentraut <peter_e@gmx.net>
  1 sibling, 0 replies; 6+ messages in thread

From: Peter Eisentraut @ 2007-08-14 15:15 UTC (permalink / raw)
  To: pgsql-admin; +Cc: Tena Sakai <tsakai@gallo.ucsf.edu>

Tena Sakai wrote:
>     ~/bin/pg_ctl -D ~/bin reload

It's quite unlikely that your data directory is "~/bin".

>   As I looked at the pid file, there were three lines.  The
>   first line seemed like the pid of the server process.  The
>   second line indicates where the database cluster resides.
>   In my case it is /usr/local/pgsql/data.

That should be your -D argument then.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2007-08-14 15:31 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-08-13 21:51 postmaster.pid file Tena Sakai <tsakai@gallo.ucsf.edu>
2007-08-13 22:37 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-08-13 22:57   ` Tena Sakai <tsakai@gallo.ucsf.edu>
2007-08-13 23:21     ` Tom Lane <tgl@sss.pgh.pa.us>
2007-08-14 15:31       ` Tena Sakai <tsakai@gallo.ucsf.edu>
2007-08-14 15:15 ` Peter Eisentraut <peter_e@gmx.net>

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