Discussion:
Shutdown pg db
(too old to reply)
Ganesan Kanavathy
2003-12-15 08:46:30 UTC
Permalink
How to properly shutdown pg db server?

Is the below command safe to shutdown the pg db server?

#killall -9 postmaster

pg_ctl does not seems work on server?

Regards,
Ganesan
Uwe C. Schroeder
2003-12-15 09:09:53 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


NEVER kill -9 a postmaster
Althoug funny enough it pretty often tolerates that kind of killing, it will
not allow the process to properly shut down the database. So you may or may
not be lucky to end up with a good database.

Use something like
/usr/bin/pg_ctl stop -D $PGDATA -s -m fast
if you have to kick out current database connections and not wait for them to
finish.

UC
Post by Ganesan Kanavathy
How to properly shutdown pg db server?
Is the below command safe to shutdown the pg db server?
#killall -9 postmaster
pg_ctl does not seems work on server?
Regards,
Ganesan
- --
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/3XphjqGXBvRToM4RAlkyAJ9eWfVCfmQ+igPOKn2lw0mvbkfYMACfSTXf
anWNcf1qnT5x86ZHG0GqQZ8=
=X7IT
-----END PGP SIGNATURE-----


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ***@postgresql.org
Tom Lane
2003-12-15 16:10:01 UTC
Permalink
Post by Uwe C. Schroeder
NEVER kill -9 a postmaster
Althoug funny enough it pretty often tolerates that kind of killing, it will
not allow the process to properly shut down the database. So you may or may
not be lucky to end up with a good database.
The database is safe enough. What you are likely to have trouble with
is starting a fresh postmaster --- kill -9 prevents the postmaster from
releasing shared memory, for example, and you may not have a high enough
SHMMAX to just go and create another shared memory segment. Do it a few
times in a row and you'll almost surely overrun SHMMAX. This will leave
you having to manually remove the old shared memory, or reboot the
machine, before you can restart Postgres.

Use the documented methods for shutting down Postgres.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Loading...