Обсуждение: Installing Postgreql

Поиск
Список
Период
Сортировка

Installing Postgreql

От
"simon godwin"
Дата:
Hi,

I'm trying to install Postgresql running Windows98. I've managed to install
Cygwin and got hold of the tar ball and unpacked it...etc.

By trial and error, more than anything else, I've managed to get the
ipc-daemon working by changing the PATH in my autoexec.bat file!  However,
when I come to initialize PostgreSQL things seem to be going wrong.  This is
what I see on the screen...

Default@PC ~
$ initdb -D /usr/share/postgresql/data
This database system will be initialized with the username "Default".
This user will own all the data files and must also own the server process.

Creating directory /usr/share/postgresql/data
Creating directory /usr/share/postgresql/data/base
Creating directory /usr/share/postgresql/data/global
Creating directory /usr/share/postgresql/data/pg_xlog
Creating template1 database in /usr/share/postgresql/data/base/1
DEBUG: database system was shut down at 2002-06-11 16:49:42
DEBUG: CheckPoint record at (0, 8)
DEBUG: Redo record at (0, 8); Undo record at (0, 8); Shutdown TRUE
DEBUG: NextTransactionId: 514; NextOid: 16384
DEBUG: database system is in production state
Creating global relations in /usr/share/postgresql/data/global
DEBUG: database system was shut down at 2002-06-11 16:49:48
DEBUG: CheckPoint record at (0, 112)
DEBUG: Redo record at (0,112); Undo record at (0, 0); Shutdown TRUE
DEBUG: NextTransactionId: 514; NextOid: 17199
DEBUG: database system is in production state
Initializing pg_shadow.
Enabling unlimited row width for system tables.
Creating system views.
Loading pg_description.
Setting lastsysoid.
Vacuuming database.
Copying template1 to template0

Success. You can now start the database server using:

   /usr/bin/postmaster -D /usr/share/postgresql/data
or
   /usr/bin/pg_ctl -D /usr/share/postgresql/data -l logfile start


Default@PC
$ /usr/bin/pg_ctl -D /usr/share/postgresql/data -l logfile start
postmaster successfully started

Default@PC
$ psql template1

...and then it just hangs there!

Hope you can give me some suggestions.  Thanks in anticipation.

Simon.



_________________________________________________________________
Join the world�s largest e-mail service with MSN Hotmail.
http://www.hotmail.com


Re: Installing Postgreql

От
"Jim.George"
Дата:
On Tue, 11 Jun 2002, simon godwin wrote:

Simon,

    before trying to psqk template1 (or 0), which I believe is not a
valid thing to do...

    You need to run initdb, then creatdb test (or anyother database
name you desire) then use psql test (or that database name).

    It's all in the README file which you can find in /usr/doc/Cygwin
or /usr/share/postgr*

HTH,


Jim

> Hi,
>
> I'm trying to install Postgresql running Windows98. I've managed to install
> Cygwin and got hold of the tar ball and unpacked it...etc.
>
> By trial and error, more than anything else, I've managed to get the
> ipc-daemon working by changing the PATH in my autoexec.bat file!  However,
> when I come to initialize PostgreSQL things seem to be going wrong.  This is
> what I see on the screen...
>
> Default@PC ~
> $ initdb -D /usr/share/postgresql/data
> This database system will be initialized with the username "Default".
> This user will own all the data files and must also own the server process.
>
> Creating directory /usr/share/postgresql/data
> Creating directory /usr/share/postgresql/data/base
> Creating directory /usr/share/postgresql/data/global
> Creating directory /usr/share/postgresql/data/pg_xlog
> Creating template1 database in /usr/share/postgresql/data/base/1
> DEBUG: database system was shut down at 2002-06-11 16:49:42
> DEBUG: CheckPoint record at (0, 8)
> DEBUG: Redo record at (0, 8); Undo record at (0, 8); Shutdown TRUE
> DEBUG: NextTransactionId: 514; NextOid: 16384
> DEBUG: database system is in production state
> Creating global relations in /usr/share/postgresql/data/global
> DEBUG: database system was shut down at 2002-06-11 16:49:48
> DEBUG: CheckPoint record at (0, 112)
> DEBUG: Redo record at (0,112); Undo record at (0, 0); Shutdown TRUE
> DEBUG: NextTransactionId: 514; NextOid: 17199
> DEBUG: database system is in production state
> Initializing pg_shadow.
> Enabling unlimited row width for system tables.
> Creating system views.
> Loading pg_description.
> Setting lastsysoid.
> Vacuuming database.
> Copying template1 to template0
>
> Success. You can now start the database server using:
>
>    /usr/bin/postmaster -D /usr/share/postgresql/data
> or
>    /usr/bin/pg_ctl -D /usr/share/postgresql/data -l logfile start
>
>
> Default@PC
> $ /usr/bin/pg_ctl -D /usr/share/postgresql/data -l logfile start
> postmaster successfully started
>
> Default@PC
> $ psql template1
>
> ...and then it just hangs there!
>
> Hope you can give me some suggestions.  Thanks in anticipation.
>
> Simon.
>
>
>
> _________________________________________________________________
> Join the world�s largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>


Re: Installing Postgreql

От
"Cornelia Boenigk"
Дата:
Hi Simon

You must start the postmaster with the option '-i', if  you don't, you
will get a socket error.

$ /usr/bin/postmaster -i -D /usr/share/postgresql/data
or
$ /usr/bin/pg_ctl start -D /usr/share/postgresql/data -o "-i"

Regards
Conni


Re: Installing Postgreql

От
Jason Tishler
Дата:
On Tue, Jun 11, 2002 at 06:59:04PM +0000, simon godwin wrote:
> Default@PC
> $ psql template1
>
> ...and then it just hangs there!
>
> Hope you can give me some suggestions.  Thanks in anticipation.

Are you using any firewall software?  Do you see anything in the
postmaster log when you execute the above?  Are you using the latest
Cygwin (i.e, 1.3.10)?

Jason

Re: Installing Postgreql

От
Jason Tishler
Дата:
Simon,

Please keep on your replies on-list.

On Tue, Jun 18, 2002 at 04:33:16PM +0000, simon godwin wrote:
> Thanks for your prompt reply.  I'm still having trouble...

You are welcome.

> >On Tue, Jun 11, 2002 at 06:59:04PM +0000, simon godwin wrote:
> >> Default@PC
> >> $ psql template1
> >>
> >> ...and then it just hangs there!
> >>
> >> Hope you can give me some suggestions.  Thanks in anticipation.
> >
> >Are you using any firewall software?
>
> No, I've downloaded the tar ball on my PC at home.

OK, others have had hangs because of firewall software.

>  Do you see anything in the
> >postmaster log when you execute the above?
>
> How do I do that?

The log is usually in /var/log/postmaster.log.  Do you have such a file?

> What am I looking for?

Error messages.

> Are you using the latest
> >Cygwin (i.e, 1.3.10)?
>
> The version of Cygwin is off the Bham Uni CD

Sorry, I have never heard of the above.

> I can't see a way of checking the version - any suggestions as to
> where I would find this?

Use uname:

    $ uname -a
    CYGWIN_NT-5.0 TISHLERJASON 1.3.11(0.53/3/2) 2002-05-24 06:57 i686 unknown

> As far as I'm aware the tar ball I've downloaded from the Cygwin site
> is compatable with the version of Cygwin on the CD!

This is to be expected if the version of the Cygwin DLL on the Bham Uni
CD is a Cygwin Net Release (and not something like b20.1 or older).

> I'm still rather confused with the error message I'm getting when I
> initialise PostgreSQL...ie. Database system shut down at ....etc.
>
> Is this normal?

Yes.

> I suspect that I still haven't got my computer configured right!

Maybe.

> Should I abandon Windows98 altogether and install Linux?

The above is a personal choice so I can't help you with that decision.
Although, if you are going to use Windows, I recommend using NT/2000/XP
and instead of 9x/Me.

> Thanks for your time and effort,

You are welcome.

Jason