From ganesh@magnusquest.com Mon Dec 15 08:47:24 2003 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id DAA8DD1C968 for ; Mon, 15 Dec 2003 08:47:24 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 10343-01 for ; Mon, 15 Dec 2003 04:46:57 -0400 (AST) Received: from magnusquest.com (magnusquest.com [128.121.126.6]) by svr1.postgresql.org (Postfix) with ESMTP id A45B1D1DBB7 for ; Mon, 15 Dec 2003 04:46:55 -0400 (AST) Received: from ganesan ([219.93.76.2]) by magnusquest.com (8.12.10/8.11.6) with ESMTP id hBF8ktCZ024835 for ; Mon, 15 Dec 2003 16:46:56 +0800 (MYT) From: "Ganesan Kanavathy" To: Subject: Shutdown pg db Date: Mon, 15 Dec 2003 16:46:30 +0800 Message-ID: <003301c3c2e7$f355b460$5400a8c0@headquarters.mq.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0034_01C3C32B.0178F460" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=1.4 tagged_above=0.0 required=5.0 tests=HTML_80_90, RCVD_IN_OSIRUSOFT_COM X-Spam-Level: * X-Archive-Number: 200312/186 X-Sequence-Number: 11693 This is a multi-part message in MIME format. ------=_NextPart_000_0034_01C3C32B.0178F460 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_0034_01C3C32B.0178F460 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

How to properly shutdown pg db server?

 

Is the below command safe to shutdown the pg db server?<= o:p>

 

#killall -9 postmaster =

 

pg_ctl d= oes not seems work on server?

 

Regards,

Ganesan

 

------=_NextPart_000_0034_01C3C32B.0178F460-- From uwe@oss4u.com Mon Dec 15 09:10:20 2003 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 728AAD1CCCB for ; Mon, 15 Dec 2003 09:10:20 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 10689-04 for ; Mon, 15 Dec 2003 05:09:54 -0400 (AST) Received: from oss4u.com (cpe-65-172-234-54.sanbrunocable.com [65.172.234.54]) by svr1.postgresql.org (Postfix) with SMTP id 11035D1B467 for ; Mon, 15 Dec 2003 05:09:52 -0400 (AST) Received: (qmail 10391 invoked from network); 15 Dec 2003 09:09:23 -0000 Received: from unknown (HELO tiburon.oss4u.com) (192.168.1.4) by gw.oss4u.com (192.168.1.1) with ESMTP; 15 Dec 2003 09:09:23 -0000 From: "Uwe C. Schroeder" Organization: OSS4U, LLC To: "Ganesan Kanavathy" , Subject: Re: Shutdown pg db Date: Mon, 15 Dec 2003 01:09:53 -0800 User-Agent: KMail/1.5 References: <003301c3c2e7$f355b460$5400a8c0@headquarters.mq.com> In-Reply-To: <003301c3c2e7$f355b460$5400a8c0@headquarters.mq.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200312150109.53153.uwe@oss4u.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/187 X-Sequence-Number: 11694 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 NEVER kill -9 a postmaster Althoug funny enough it pretty often tolerates that kind of killing, it wil= l=20 not allow the process to properly shut down the database. So you may or may= =20 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=20 finish. UC On Monday 15 December 2003 12:46 am, Ganesan Kanavathy wrote: > 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=3D =3DX7IT -----END PGP SIGNATURE----- From tgl@sss.pgh.pa.us Mon Dec 15 16:10:29 2003 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 6C7D0D1BC5C for ; Mon, 15 Dec 2003 16:10:29 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 67035-06 for ; Mon, 15 Dec 2003 12:10:07 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id F14D5D1BB74 for ; Mon, 15 Dec 2003 12:10:00 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id hBFGA119012971; Mon, 15 Dec 2003 11:10:01 -0500 (EST) To: "Uwe C. Schroeder" Cc: "Ganesan Kanavathy" , pgsql-admin@postgresql.org Subject: Re: Shutdown pg db In-reply-to: <200312150109.53153.uwe@oss4u.com> References: <003301c3c2e7$f355b460$5400a8c0@headquarters.mq.com> <200312150109.53153.uwe@oss4u.com> Comments: In-reply-to "Uwe C. Schroeder" message dated "Mon, 15 Dec 2003 01:09:53 -0800" Date: Mon, 15 Dec 2003 11:10:01 -0500 Message-ID: <12970.1071504601@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/193 X-Sequence-Number: 11700 "Uwe C. Schroeder" writes: > 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