Thread: Postgres postmaster

Postgres postmaster

From
Bill
Date:
Hi all,

I'm brand-new to postgres.  I have installed version 6.5 on RHL 6.1 (the
rpm).  when I try to create a database, I get:
----------------------------------------------------------------------------------------------------------------------
[workshop@hoss workshop]$ createdb donneybrook
Connection to database 'template1' failed.
connectDB() -- connect() failed: Connection refused
Is the postmaster running at 'localhost' and accepting connections on Unix
socke
t '5432'?

createdb: database creation failed on donneybrook.
[workshop@hoss workshop]$
----------------------------------------------------------------------------------------------------------------------

In /etc/services, port 5432 refers to 'postgres'.

I created the postgres user in linuxconf, but fail to see how this makes it
the postmaster.  I understand that "postmaster"
refers not to the email boss, but the master of postgres.

Shouldn't these details have been taken care of by the rpm, and if not,
what do I do to fix this?

Thanks
Bill


Re: Postgres postmaster

From
David Olbersen
Date:
Well actually in this instance 'postmaster' refers to 1/2 of the database
backend. It's a program (typically installed in /usr/local/pgsql/bin ) that
handles input.

You really should RTFM.

-- Dave


Re: Postgres postmaster

From
"J.Goodleaf"
Date:
If you're new to Postgres but not to Linux, I suggest that you download the
source and do the configuration yourself. In reading the various install
documents, you'll come across the answer to this particular question besides
which you get a much newer (and better) version of PostgreSQL. Seriously, 7
is a lot better than 6.5. RPMs are not, to my mind, as good as compiled
versions. This is especially the case with PostgreSQL, which has many
compilation options that really do affect what the database does. (For
example, does your RPM do TCL?)

There's also this:
http://www.postgresql.org/users-lounge/docs/7.0/postgres/install.htm

which will answer some basic postmaster questions as well.
 -John

Bill writes:

> Hi all,
>
> I'm brand-new to postgres.  I have installed version 6.5 on RHL 6.1 (the
> rpm).  when I try to create a database, I get:
> --------------------------------------------------------------------------
> --------------------------------------------
> [workshop@hoss workshop]$ createdb donneybrook
> Connection to database 'template1' failed.
> connectDB() -- connect() failed: Connection refused
> Is the postmaster running at 'localhost' and accepting connections on Unix
> socke
> t '5432'?
>
> createdb: database creation failed on donneybrook.
> [workshop@hoss workshop]$
> --------------------------------------------------------------------------
> --------------------------------------------
>
> In /etc/services, port 5432 refers to 'postgres'.
>
> I created the postgres user in linuxconf, but fail to see how this makes
> it the postmaster.  I understand that "postmaster"
> refers not to the email boss, but the master of postgres.
>
> Shouldn't these details have been taken care of by the rpm, and if not,
> what do I do to fix this?
>
> Thanks
> Bill
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html



                               _____________________________
                               |        J. Goodleaf        |
                               |                           |
                           / ) | Technology Coordinator    |
                          / /  | FreeBSD Advocate          |
                         ( (   | email ==>                 |
                       (((\ \> |/ )  john@goodleaf.net     |
                       (\\\\ \_/ /_________________________|
                        \       /
                         \    _/
                         /   /
                        /   /

Re: Postgres postmaster

From
Bill
Date:
David Olbersen wrote this :



>Well actually in this instance 'postmaster' refers to 1/2 of the database
>backend. It's a program (typically installed in /usr/local/pgsql/bin ) that
>handles input.
>
>You really should RTFM.
>
>-- Dave
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org



I did.
------------------------------------------------------------------
[root@hoss workshop]# cd /usr/local/pgsql/bin
bash: /usr/local/pgsql/bin: No such file or directory
[root@hoss workshop]# cd /usr/pgsql/bin
bash: /usr/pgsql/bin: No such file or directory
[root@hoss workshop]# find / -name pgsql -print
find: /proc/6/fd: Permission denied
[root@hoss workshop]#
-------------------------------------------------------------------

Excerpt from Random House Dictionary of the English language:
------------------------------------------------------------------
novice (nov'is), n. 1. a person who is new to the circumstances, work,
etc., in which he is placed;...
------------------------------------------------------------------

Excerpt from the postgresql.org Users Lounge:
------------------------------------------------------------------
pgsql-novice - No question is too simple here.
------------------------------------------------------------------

Email address the original question was sent to:
-----------------------------------------------------------------
pgsql-novice@postgresql.org

Central issue of my original post:
-----------------------------------------------------------------
Shouldn't these details have been taken care of by the rpm, and if not,
what do I do to fix this?


You really should Read The F*^&*^ Question.



Re: Postgres postmaster

From
Bill
Date:
Oh hell, that's cool I guess.  I shouldn't have gotten smart.  Anyway, I
tried the ***src.rpm, and it failed to complete.
I'm going to grab the tarball and do it fresh. Thanks.


>Delivered-To: workshop@willysworkshop.com
>X-Sender: workshop@hoss.willysworkshop.com
>X-Mailer: QUALCOMM Windows Eudora Version 4.3.2
>Date: Tue, 06 Mar 2001 16:29:47 -0800
>To: pgsql-novice@postgresql.org
>From: Bill <workshop@willysworkshop.com>
>Subject: Re: [NOVICE] Postgres postmaster
>Sender: pgsql-novice-owner@postgresql.org
>
>David Olbersen wrote this :
>
>
>
>>Well actually in this instance 'postmaster' refers to 1/2 of the database
>>backend. It's a program (typically installed in /usr/local/pgsql/bin ) that
>>handles input.
>>
>>You really should RTFM.
>>
>>-- Dave
>>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>
>
>I did.
>------------------------------------------------------------------
>[root@hoss workshop]# cd /usr/local/pgsql/bin
>bash: /usr/local/pgsql/bin: No such file or directory
>[root@hoss workshop]# cd /usr/pgsql/bin
>bash: /usr/pgsql/bin: No such file or directory
>[root@hoss workshop]# find / -name pgsql -print
>find: /proc/6/fd: Permission denied
>[root@hoss workshop]#
>-------------------------------------------------------------------
>
>Excerpt from Random House Dictionary of the English language:
>------------------------------------------------------------------
>novice (nov'is), n. 1. a person who is new to the circumstances, work,
>etc., in which he is placed;...
>------------------------------------------------------------------
>
>Excerpt from the postgresql.org Users Lounge:
>------------------------------------------------------------------
>pgsql-novice - No question is too simple here.
>------------------------------------------------------------------
>
>Email address the original question was sent to:
>-----------------------------------------------------------------
>pgsql-novice@postgresql.org
>
>Central issue of my original post:
>-----------------------------------------------------------------
>Shouldn't these details have been taken care of by the rpm, and if not,
>what do I do to fix this?
>
>
>You really should Read The F*^&*^ Question.
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


Re: Postgres postmaster

From
GH
Date:
On Tue, Mar 06, 2001 at 04:29:47PM -0800, some SMTP stream spewed forth:
> David Olbersen wrote this :
> >Well actually in this instance 'postmaster' refers to 1/2 of the database
> >backend. It's a program (typically installed in /usr/local/pgsql/bin ) that
> >handles input.
> >
> >You really should RTFM.
> You really should Read The F*^&*^ Question.

Heh. Does anybody else still feel like helping?
I would hate to step on some sore toes, I mean, sheesh... ;-)

> >
> >-- Dave
> ------------------------------------------------------------------
> [root@hoss workshop]# cd /usr/local/pgsql/bin
> bash: /usr/local/pgsql/bin: No such file or directory
> [root@hoss workshop]# cd /usr/pgsql/bin
> bash: /usr/pgsql/bin: No such file or directory
> [root@hoss workshop]# find / -name pgsql -print
> find: /proc/6/fd: Permission denied
> [root@hoss workshop]#
> -------------------------------------------------------------------

This is the first of several problems.
Find out where your PostgreSQL installation resides.
If nothing else, try running (as root):
find / -name postmaster
which should find the 'postmaster' binary.
(Someone please speak up if you know of a better way of ascertaining
said location.)

*Snip a bunch of useless mess about novice mess. We are here to help
each other afterall. Why can we not be decent?*

> Central issue of my original post:
> -----------------------------------------------------------------
> Shouldn't these details have been taken care of by the rpm, and if not,

I do not know.
RPMs are not on my list of Good Things.

> what do I do to fix this?

1) Find the location of your PostgreSQL installation.
Usually, this is '/usr/local/pgsql' (at least, on FreeBSD).

2) Go to that directory and (as the PostgreSQL user on your system, which
could be 'pgsql' or whatever) run `initdb` as per the instructions
in the PostgreSQL documentation (found at www.postgresql.org). (If you
have trouble *after* reading
what documentation is available, *then* come to the list, because
up the nose of the Universe if you think I am about to copy the online
documentation to you in an e-mail. If, for some reason, the documentation
is unavailable to you, let me know, and we will work from there.)

3) See if the rpm installed a startup script (in /usr/local/etc/rc.d
under FreeBSD using the ports collection) in the standard rc location
for your operating system. If it did, then (as root) try starting
postmaster using the startup script in the customary way for your OS.

4) Obviously, try connecting to the database (using `psql` for example).

Write back with your results.


Live life and enjoy it!
_Zorba the Greek_, Nikos Kazantzakis

> You really should Read The F*^&*^ Question.

Say, do you always ask for help like this?
Is it usually effective?
I rather feel like kicking you in the head, but that would
not serve well for the Project, now, would it?


Besides, you would probably rather read the manual than deal with us old
bastards anyway.

dan


Re: Postgres postmaster

From
Michael Jinks
Date:
Long-time RPM jockey about to chime in... There are all kinds of things
we can do to check the status of the postgres* packages, info here will
have little to do with postgresql generally but does come in handy if
you're using RPM's for anything.


GH wrote:

> find / -name postmaster
> which should find the 'postmaster' binary.
> (Someone please speak up if you know of a better way of ascertaining
> said location.)

Dunno about "better," but faster, and with other applications as well --

If it was installed from an rpm package you can do

rpm -ql <PackageTitle>

(pipe to grep or less, especially for large packages)

If you think the package may be screwed up somehow you can do

rpm -V <PackageTitle>

...for a list of the things that rpm sees as different than they were
when it installed the package (file sizes, MD5 checksums, and of course
altogether missing stuff are checked for)

If you can't remember the exact name of a package (in which case the
commands above will come back claiming that the package isn't present),
or in cases where a package might have several subcomponents or add-on
modules with similar names, you can do

rpm -qa | grep -i <whatever>

...which will kick back a list of titles suitable for use as arguments
to the above; for example

[mjinks@gaea mjinks]$ rpm -qa | grep -i postgres
postgresql-server-7.0.2-17    <--- necessary in addition to the "main"
package, by the way
postgresql-7.0.2-17
postgresql-devel-7.0.2-17     <--- possibly not necessary depending on
what else you're going to do



> 1) Find the location of your PostgreSQL installation.
> Usually, this is '/usr/local/pgsql' (at least, on FreeBSD).

For better or for worse, RPM's don't usually install anything under
/usr/local.  For example,

[mjinks@gaea mjinks]$ rpm -ql postgresql | grep bin
/usr/bin/createdb
/usr/bin/createlang
/usr/bin/createuser
/usr/bin/dropdb
/usr/bin/droplang
/usr/bin/dropuser
/usr/bin/pg_dump
/usr/bin/pg_dumpall
/usr/bin/pg_id
/usr/bin/psql
/usr/bin/vacuumdb
<snip>

> 2) Go to that directory and (as the PostgreSQL user on your system, which
> could be 'pgsql' or whatever) run `initdb` as per the instructions
> in the PostgreSQL documentation

The RPM's should in fact take care of this.  Well, more precisely I
think that they install initialization scripts which run inidb if they
detect that it hasn't happened yet -- at least mine have all done it
that way lately.

> 3) See if the rpm installed a startup script (in /usr/local/etc/rc.d
> under FreeBSD using the ports collection) in the standard rc location
> for your operating system. If it did, then (as root) try starting
> postmaster using the startup script in the customary way for your OS.

Again, yeah, this should be there, but not installed by the main
postgresql package:

[mjinks@gaea mjinks]$ rpm -ql postgresql-server | grep rc.d
/etc/rc.d/init.d/postgresql

--
Michael Jinks  mjinksATsysvi.com ~*~ http://www.yellow5.com/pokey/
unconfirmed: the linux penguin;the bsd daemon;the sunOS brain slug