Thread: Two configuration issues...

Two configuration issues...

From
"E. Matthew Finnin"
Date:
I have Postgres 8.1 on Kubuntu Breezy on powerpc.  I used the apt-get
to install the package.  The server ran fine right from the beginning
and I had no problems with psql.  I then changed the location of my
data directory and I created a new user.  I can still use psql, but
now I have two (maybe small) issues.

1. When I attempt /etc/init.d/postgresql-8.1 restart I get the error:

Stopping PostgreSQL 8.1 database server: main
Error: pid file is invalid, please manually kill the stale server process

...but the server starts up just fine.  When I look at current process
I find four postmaster processes.  I don't really know how to describe
it, but it looks like one lead process, two sub-processes, and one
sub-sub-process.  Is this a problem?  Did I forget to do something
when changing my data directory?


2. My other problem:  When I am running as a non-root user and I type:
$ su postgres
I'm asked for a password and no matter what I type I have an
authorization failure.  Now, I assumed this would be the password I
created for my superuser when running initdb -D.  Is there anyway to
figure out what this password is or to change it?  Or do I need to
just accept that I need to do su root before I do su postgres?

Thanks for any help or suggestions.

-eric

Re: Two configuration issues...

From
george young
Date:
On Sat, 1 Apr 2006 14:09:18 -0800
"E. Matthew Finnin" <emf.storage@gmail.com> threw this fish to the penguins:

> I have Postgres 8.1 on Kubuntu Breezy on powerpc.  I used the apt-get
> to install the package.  The server ran fine right from the beginning
> and I had no problems with psql.  I then changed the location of my
> data directory and I created a new user.  I can still use psql, but
> now I have two (maybe small) issues.
>
> 1. When I attempt /etc/init.d/postgresql-8.1 restart I get the error:
>
> Stopping PostgreSQL 8.1 database server: main
> Error: pid file is invalid, please manually kill the stale server process
>
> ...but the server starts up just fine.  When I look at current process
> I find four postmaster processes.  I don't really know how to describe
> it, but it looks like one lead process, two sub-processes, and one
> sub-sub-process.  Is this a problem?  Did I forget to do something
> when changing my data directory?

This sounds like a normal healthy base set of processes for postgres.
the pid file is probably in pgdata_dir/postmaster.pid, but there could
be another one in /var/run/postgres.pid.  Be sure that when you changed
the data directory, you set the PGDATA variable in the startup script,
not just a -D option on one line.
>
> 2. My other problem:  When I am running as a non-root user and I type:
> $ su postgres
> I'm asked for a password and no matter what I type I have an
> authorization failure.  Now, I assumed this would be the password I
> created for my superuser when running initdb -D.  Is there anyway to
> figure out what this password is or to change it?  Or do I need to
> just accept that I need to do su root before I do su postgres?

This is not the *postgres* password, it is the linux password.  Just su
to root and use the passwd command to set a password for postgres, and
you should be OK.

> Thanks for any help or suggestions.
>
> -eric
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faq
>


--
"Are the gods not just?"  "Oh no, child.
What would become of us if they were?" (CSL)