Re: Setting up Postgresql on Linux

From: Phil Campaigne <pcampaigne(at)charter(dot)net>
To: pcampaigne(at)charter(dot)net
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Setting up Postgresql on Linux
Date: 2004-03-04 17:45:43
Message-ID: 40476B47.9060806@charter.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Phil Campaigne wrote:
> Hello,
> I am trying to use the linux startup script in the contrib directory of
> the distribution. I get the following error in the server log:
>
> LOG: invalid secondary checkpoint record
> PANIC: unable to locate a valid checkpoint record
> LOG: startup process (pid 1480) was terminated by signal 6
> LOG: aborting startup due to startup process failure
>
> When I issue the this collamd I get an error:
>
> [postgres(at)hardwoodthunder postgres]$ psql -- v
> psql: could not connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
>
> I have added theses lines in postgresql.config:
>
> tcpip_socket = true
> port = 5432
>
> If I isssue the command:
> [postgres(at)hardwoodthunder postgres]$ /etc/init.d/postgres status
> Password:
> pg_ctl: postmaster or postgres is not running
>
> Any ideas what I'm doing wrong?
> thanks,
> Phil
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

Opps! I fixed the above problems by re-initializing and creating a new
data directory. But as I continued I got another error, here's the
printout:

[postgres(at)hardwoodthunder postgres]$ psql testdb
Welcome to psql 7.3.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

psql: relocation error: psql: undefined symbol: PQgetssl <?????????????

So I set these env variables:
[postgres(at)hardwoodthunder postgres]$ LD_LIBRARY_PATH=/usr/local/pgsql/lib
[postgres(at)hardwoodthunder postgres]$ export LD_LIBRARY_PATH
[postgres(at)hardwoodthunder postgres]$
[postgres(at)hardwoodthunder postgres]$ PATH=/usr/local/pgsql/bin:$PATH
[postgres(at)hardwoodthunder postgres]$ export PATH

And it works!

[postgres(at)hardwoodthunder postgres]$ psql testdb
Welcome to psql 7.3.4, 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

testdb=#

MY QUESTION:
These env varialbes are already set in .bash_profile for root and
postgres users. Why do I have to set them manually every time?
thanks,
Phil

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Enrico Weigelt 2004-03-04 17:49:26 Re: REFERENCES error message complaint, suggestion
Previous Message Phil Campaigne 2004-03-04 17:11:10 Setting up Postgresql on Linux