Thread: starting postgresql for first time
Thankyou to all the people who have taken the time to reply my posts, unfortunately nothing has worked. I have removed postgresql and reinstalled from source following the directions from: http://www.postgresql.org/docs/current/static/install-post.htm this is the end result... gmake[2]: Leaving directory `/usr/local/src/postgresql-7.4.2/src/pl' gmake[1]: Leaving directory `/usr/local/src/postgresql-7.4.2/src' postgreSQL installation complete. GMAKE INSTALL FINISHES SUCCESSFULLY [root@localhost postgresql-7.4.2]# LD_LIBRARY_PATH=/usr/local/pgsql/lib [root@localhost postgresql-7.4.2]# export LD_LIBRARY_PATH [root@localhost postgresql-7.4.2]# su postgres bash-2.05b$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale en_NZ.UTF-8. creating directory /usr/local/pgsql/data... ok creating directory /usr/local/pgsql/data/base... ok creating directory /usr/local/pgsql/data/global... ok creating directory /usr/local/pgsql/data/pg_xlog... ok creating directory /usr/local/pgsql/data/pg_clog... ok selecting default max_connections... 100 selecting default shared_buffers... 1000 creating configuration files... ok creating template1 database in /usr/local/pgsql/data/base/1... ok initializing pg_shadow... ok enabling unlimited row size for system tables... ok initializing pg_depend... ok creating system views... ok loading pg_description... ok creating conversions... ok setting privileges on built-in objects... ok creating information schema... ok vacuuming database template1... ok copying template1 to template0... ok Success. You can now start the database server using: /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data or /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start INITIALISATION IS SUCCESSFUL bash-2.05b$ /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data LOG: could not create IPv6 socket: Address family not supported by protocol LOG: database system was shut down at 2004-04-29 10:51:19 NZST LOG: checkpoint record is at 0/9B1058 LOG: redo record is at 0/9B1058; undo record is at 0/0; shutdown TRUE LOG: next transaction ID: 536; next OID: 17142 LOG: database system is ready AT THIS POINT I DID CTRL+Z AS NOTHING ELSE HAPPENED [1]+ Stopped /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data POSMASTER HAS STOPPED bash-2.05b$ /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data FATAL: lock file "/usr/local/pgsql/data/postmaster.pid" already exists HINT: Is another postmaster (PID 19495) running in data directory "/usr/local/pgsql/data"? bash-2.05b$ UNABLE TO RESTART? ANOTHER INSTANCE OF POSTMASTER RUNNING? NO!! If someone could explain to me what is going on I would appreciate it. Without a doubt one of the more user unfriendly programmes I have come across! Bob Whats that other dbms my…my something……
Robert Morgan <robert_@ihug.co.nz> writes: > AT THIS POINT I DID CTRL+Z AS NOTHING ELSE HAPPENED You seem to be missing the fundamental concept that you want to start the postmaster as a background process. See http://www.postgresql.org/docs/7.4/static/postmaster-start.html regards, tom lane
On Apr 28, 2004, at 18:30, Robert Morgan wrote: > INITIALISATION IS SUCCESSFUL > > bash-2.05b$ /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data > LOG: could not create IPv6 socket: Address family not supported by > protocol > LOG: database system was shut down at 2004-04-29 10:51:19 NZST > LOG: checkpoint record is at 0/9B1058 > LOG: redo record is at 0/9B1058; undo record is at 0/0; shutdown TRUE > LOG: next transaction ID: 536; next OID: 17142 > LOG: database system is ready > > AT THIS POINT I DID CTRL+Z AS NOTHING ELSE HAPPENED > > [1]+ Stopped /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data > > POSMASTER HAS STOPPED > > bash-2.05b$ /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data > FATAL: lock file "/usr/local/pgsql/data/postmaster.pid" already exists > HINT: Is another postmaster (PID 19495) running in data directory > "/usr/local/pgsql/data"? > bash-2.05b$ > > UNABLE TO RESTART? ANOTHER INSTANCE OF POSTMASTER RUNNING? NO!! > > If someone could explain to me what is going on I would appreciate it. > > Without a doubt one of the more user unfriendly programmes I have come > across! You may look first for a book explaining basic Linux and bash concepts. From the bash man page: "Typing the ****suspend**** character (typically ^Z, Control-Z) while a process is running causes that process to be stopped and returns control to bash." This does not kill the process. The process is still alive but suspended and can be restarted either by the 'bg' or 'fg' job control commands. This means that the lock files are still there and Postgres is right, there is another postmaster instance running. Avi
hi robert , nothing like some fun! On Thu, Apr 29, 2004 at 11:30:01AM +1200, Robert Morgan wrote: > Thankyou to all the people who have taken the time to reply my posts, > unfortunately nothing has worked. :) > > bash-2.05b$ /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data > LOG: could not create IPv6 socket: Address family not supported by protocol > LOG: database system was shut down at 2004-04-29 10:51:19 NZST > LOG: checkpoint record is at 0/9B1058 > LOG: redo record is at 0/9B1058; undo record is at 0/0; shutdown TRUE > LOG: next transaction ID: 536; next OID: 17142 > LOG: database system is ready > > AT THIS POINT I DID CTRL+Z AS NOTHING ELSE HAPPENED > > [1]+ Stopped /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data > > POSMASTER HAS STOPPED > > bash-2.05b$ /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data > FATAL: lock file "/usr/local/pgsql/data/postmaster.pid" already exists > HINT: Is another postmaster (PID 19495) running in data directory > "/usr/local/pgsql/data"? > bash-2.05b$ > > UNABLE TO RESTART? ANOTHER INSTANCE OF POSTMASTER RUNNING? NO!! > > If someone could explain to me what is going on I would appreciate it. > > Without a doubt one of the more user unfriendly programmes I have come > across! :) developers, any plans for a desktop icon? A tooltray icon would help, too. > > Bob > at that point where you hit CTRL-Z you could just hit return. When you did that, you stopped the postmaster by setting itto joe 20879 0.0 0.0 1328 340 pts/5 T 23:22 0:00 ./program_network_server.exe infile localhost 8888 the eighth field is now a T. That means traced/stopped. are you in new zealand? (is NZST really new zealand standard time?) to restart, don't just delete the lock file "/usr/local/pgsql/data/postmaster.pid" YOu need to put the job in the foreground . The way to unstop a process is fg (bash) which you are in. again. YOu shouldn't need to do CTRL-z as you can just hit return. those are just messgaes on the console, you can ignore themand continue.
one would have thought this was automatic, or is there a reason somebody would want to run it in the terminal? On Thu, Apr 29, 2004 at 12:25:49AM -0400, Tom Lane wrote: > Robert Morgan <robert_@ihug.co.nz> writes: > > AT THIS POINT I DID CTRL+Z AS NOTHING ELSE HAPPENED > > You seem to be missing the fundamental concept that you want to start > the postmaster as a background process. See > http://www.postgresql.org/docs/7.4/static/postmaster-start.html > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) -- joe speigle www.sirfsup.com