Received: from maia.hub.org (unknown [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 2643B1337999 for ; Mon, 25 Oct 2010 12:23:02 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 81057-03 for ; Mon, 25 Oct 2010 15:22:51 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mail.postgresql.org (Postfix) with ESMTP id CF55B1336473 for ; Mon, 25 Oct 2010 12:22:50 -0300 (ADT) Received: from [192.168.1.7] (static-71-179-240-8.bltmmd.fios.verizon.net [71.179.240.8]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0Mgrgq-1OxHqp2Bg8-00M4Kg; Mon, 25 Oct 2010 17:22:48 +0200 Message-ID: <4CC5A0C6.8080901@2ndquadrant.com> Date: Mon, 25 Oct 2010 11:22:46 -0400 From: Greg Smith User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: gnanam@zoniac.com CC: pgsql-admin@postgresql.org Subject: Re: pg_ctl: server does not shut down References: <001201cb0321$df429d40$9dc7d7c0$@com> <00ca01cb03dc$a9ffe780$fdffb680$@com> <002d01cb7417$595f78d0$0c1e6a70$@com> In-Reply-To: <002d01cb7417$595f78d0$0c1e6a70$@com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:5ie5/4ZYpxs9bl+j9O5gox3TRXcqu1eJY0t3L9PxJUv oLZRWrDStx1VJKPduxqPmFci9QTyMOriQgNOxPnXzS1YufzCFe avanXKa1FbkbJNl98p6a7FA0XSRGAVIleMjHfjhgZufJXNved4 5SueJ6xgn+Ce9Jg47273sYKqNumw4ml34/mLiwVfecooJZfGol guflJMlwiOUHul7w4Vh0eb+An2UNIZoicf2irqTyA0= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201010/178 X-Sequence-Number: 35919 Gnanakumar wrote: > 1. What could be the root cause of PostgreSQL server not shutting > down ever? > 2. Am I following a different/incorrect way of disabling PITR? > You can check if PITR is disabled by executing: SHOW archive_command; At a psql prompt. If that's empty, then you turned it off, and it isn't involved in the shutdown issue you have anymore. Normally when the server doesn't want to shut down, that's because of a client that won't exit normally, not something in the main server. Take a look at what processes are still running against the database and see if there are clients attached after the fast shutdown attempt. If so, those are your problem, not something to PITR. If you know every client has been stopped or is doing nothing useful, you can do an immediate shutdown of the server and kick everyone off. You'll get messages about unclean shutdown, but no data should be lost. The "service" scripts don't do that though. You'll need to do something like this instead, presuming you start as root: su postgres pg_ctl -D /var/lib/pgsql/data -m immedate stop -- Greg Smith, 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services and Support www.2ndQuadrant.us Author, "PostgreSQL 9.0 High Performance" Pre-ordering at: https://www.packtpub.com/postgresql-9-0-high-performance/book