Thread: FW: Help installing pgSQL 7.4.2 on Solaris 9

FW: Help installing pgSQL 7.4.2 on Solaris 9

From
"Jeff Stout"
Date:
I am trying to install pgSQL 7.4.2 on Solaris 9

I am using gcc 3.3.2, readline 4.3, perl 5.8,

my full PATH is
/usr/local/bin:/usr/local/sbin:/usr/ccs/bin:/usr/dt/bin:/usr/openwin/bin: \
/usr/bin:/usr/sbin

After downloading and un-taring/un-ziping

I run ./configure

I don't see any errors.

when I run "make" (gnu make 3.80) all hell breaks loose

I get tons of
gcc - 02 -fno-strict-aliasing -Wall -Wmissing-protypes -Wmissing-declaration

when it is entering in and out of directories

This completes, then I run "make install"

same gcc errors but not as many

When I try to initialize the DB this it where everything stops.

su postgres
./initdb -D /usr/local/pgsql/data

The program /usr/local/pgsql/bin/postgress   needed by
initdb does not belong to PostgreSQL version 7.4.2
or there may be a configuration problem

ld.so.1:/usr/local/pgsql/bin/postgres: fatal:
libreadline.so.4  open failed: No such file or directory


I'm not sure what I'm missing, the install seems pretty straight forward
I've tried different versions of postgres 7.4.1 and 7.4 same errors.

Any help or advice would be greatly appreciated.

Thanks
Jeff Stout
CCT







Re: FW: Help installing pgSQL 7.4.2 on Solaris 9

From
jseymour@LinxNet.com (Jim Seymour)
Date:
"Jeff Stout" <jstout@cctus.com> wrote:
>
> I am trying to install pgSQL 7.4.2 on Solaris 9
>
> I am using gcc 3.3.2, readline 4.3, perl 5.8,
>
> my full PATH is
> /usr/local/bin:/usr/local/sbin:/usr/ccs/bin:/usr/dt/bin:/usr/openwin/bin: \
> /usr/bin:/usr/sbin
>
> After downloading and un-taring/un-ziping
>
> I run ./configure
>
> I don't see any errors.
>
> when I run "make" (gnu make 3.80) all hell breaks loose
>
> I get tons of
> gcc - 02 -fno-strict-aliasing -Wall -Wmissing-protypes -Wmissing-declaration

That's just the makefile commands being echo'd.  Have you never built a
package from a source tarball before?  This is normal.

>
> when it is entering in and out of directories
>
> This completes, then I run "make install"
>
> same gcc errors but not as many
>
> When I try to initialize the DB this it where everything stops.
>
> su postgres
> ./initdb -D /usr/local/pgsql/data
>
> The program /usr/local/pgsql/bin/postgress   needed by
> initdb does not belong to PostgreSQL version 7.4.2
> or there may be a configuration problem
>
> ld.so.1:/usr/local/pgsql/bin/postgres: fatal:
> libreadline.so.4  open failed: No such file or directory

Don't know about the "doesn't belong or..." problem, but the second one
is probably due to the same thing as I suggested to another Solaris
user, just within the last few days...

Is directory containing libreadline in LD_LIBRARY_PATH when you're su'd
to the postgreSQL user?

I added

    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib; export LD_LIBRARY_PATH

to /etc/init.d/postgresql and created a .profile in its home directory
with that in it.

Solved all those problems :).

You can also solve such problems by using the -R switch during build
(man ld) and with Solaris 8/9's new "crle" utility.

--
Jim Seymour                | Spammers sue anti-spammers:
jseymour@LinxNet.com       |     http://www.LinxNet.com/misc/spam/slapp.php
http://jimsun.LinxNet.com  | Please donate to the SpamCon Legal Fund:
                           |     http://www.spamcon.org/legalfund/

Syntax question

From
"Jeff Stout"
Date:
I am fairly new to postgres, I need to know how to switch
databases once I'm in a psql session. I can't seem to find the
command for \h , maybe I just blind |-;

Thank you in advance

Jeff Stout


Re: Syntax question

From
"Scott Marlowe"
Date:
On Mon, 2004-06-07 at 15:18, Jeff Stout wrote:
> I am fairly new to postgres, I need to know how to switch
> databases once I'm in a psql session. I can't seem to find the
> command for \h , maybe I just blind |-;

\c database


Re: Syntax question

From
jseymour@linxnet.com (Jim Seymour)
Date:
"Jeff Stout" <jstout@cctus.com> wrote:
>
> I am fairly new to postgres, I need to know how to switch
> databases once I'm in a psql session. I can't seem to find the
> command for \h , maybe I just blind |-;

"\?" is your friend...

$ psql
Password:
Welcome to psql 7.4.2, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

jseymour=> \?
General
  \c[onnect] [DBNAME|- [USER]]
                 connect to new database (currently "jseymour")
[snip]

jseymour=> \l
        List of databases
   Name    |  Owner   | Encoding
-----------+----------+-----------
 bookbiz   | jseymour | SQL_ASCII
 bookbiz2  | jseymour | SQL_ASCII
 jseymour  | jseymour | SQL_ASCII
 mydb      | jseymour | SQL_ASCII
[snip]
(12 rows)

jseymour=> \c mydb
You are now connected to database "mydb".
mydb=>

HTH,
Jim

Re: Syntax question

From
Andrew Biagioni
Date:
Jeff,

you need to look under "\?" (psql commands), not "\h" (SQL commands).

Anyway, what you need is:

  \c[onnect] [DBNAME|- [USER]]
                 connect to new database (currently "[...]")


Jeff Stout wrote:

> I am fairly new to postgres, I need to know how to switch
> databases once I'm in a psql session. I can't seem to find the
> command for \h , maybe I just blind |-;
>
> Thank you in advance
>
> Jeff Stout
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match
>
>
>

pg_ctl question

From
"Jeff Stout"
Date:
I am using the /contrib/start-scripts/linux file to set
up postgres to automatically restart upon reboot.

I set it up /etc/init.d/postgres which calls pg_ctl

pg_ctl invokes postmaster

where do I set the -i option to allow tcp connection?

I am able to set the database to start upon boot, but
can not get pgAdmin to connect.

Thank you in advance for you help.

Jeff
CCT


Re: pg_ctl question

From
Peter Eisentraut
Date:
Jeff Stout wrote:
> I am using the /contrib/start-scripts/linux file to set
> up postgres to automatically restart upon reboot.
>
> I set it up /etc/init.d/postgres which calls pg_ctl
>
> pg_ctl invokes postmaster
>
> where do I set the -i option to allow tcp connection?

In /usr/local/pgsql/data/postgresql.conf (or your local equivalent
database directory), set

tcpip_socket = true

and do pg_ctl reload


Re: pg_ctl question

From
jseymour@linxnet.com (Jim Seymour)
Date:
"Jeff Stout" <jstout@cctus.com> wrote:
>
> I am using the /contrib/start-scripts/linux file to set
> up postgres to automatically restart upon reboot.
>
> I set it up /etc/init.d/postgres which calls pg_ctl
>
> pg_ctl invokes postmaster
>
> where do I set the -i option to allow tcp connection?
[snip]

Set "tcpip_socket = true" in $PGDATA/postgresql.conf and restart.

And you'll want to set up host entries in $PGDATA/pg_hba.conf, as
well.

Jim