Page 1 of 1

XP comamnd line to start Postgre

PostPosted: Thu Jan 15, 2009 10:26 pm
by jsweetman
I'm getting some kind of error when I try to start the Postgre servive from Programs but it flashes by too fast to see. What is the command line language for starting the service?

Re: XP comamnd line to start Postgre

PostPosted: Fri Jan 16, 2009 4:46 am
by yournamehere
are you sure it isn't actually running and what's flashing on the screen is "already running"? :) I run pgsql on linux but from what I read in posts about windows setups is that it is generally a start up service meaning you wouldn't be trying to run it manually.

if that's not the case for you then probably easiest is to look at the end of postgresql.log and see what it's complaining about (iirc flat out errs always log but if necessary you can bump verbosity in postgresql.conf and try again).

if that doesn't work (this is a linux path you'll need to translate yourself) then look at the file "/var/lib/pgsql/data/postmaster.opts" which shows how it was last started.

and last but not least, if none of those work, in linux it's generically started with "/usr/local/bin/postmaster -p 5432 -D /var/lib/pgsql/data -i" by postgres user (and again you'll have to make the windows path translations).

Re: XP comamnd line to start Postgre

PostPosted: Fri Jan 16, 2009 10:46 am
by kraada
yournamehere is correct that the postmaster.opts file contains the way that postgres was started last time; in Windows it's located in C:\Program Files\PostgreSQL\8.3\data\.

If you look at the most recent file in C:\Program Files\PostgreSQL\8.3\data\pg_log it should tell you more about what's going on; that's where PostgreSQL writes its log files.

You can check if PostgreSQL is running by pressing ctrl+alt+del and clicking Task Manager, change to the Processes tab and if PostgreSQL is running you'll see several postgres processes there.

highfalutin