Received: from maia.hub.org (unknown [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 331F81337B8D for ; Mon, 25 Oct 2010 04:43:53 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 39264-06 for ; Mon, 25 Oct 2010 07:43:45 +0000 (UTC) X-Greylist: delayed 00:05:28.137805 by SQLgrey-1.7.6 Received: from rs73.luxsci.com (rs73.luxsci.com [64.49.254.135]) by mail.postgresql.org (Postfix) with ESMTP id 59FB51336473 for ; Mon, 25 Oct 2010 04:43:45 -0300 (ADT) Received: from GNANAM (ABTS-TN-Static-186.58.165.122.airtelbroadband.in [122.165.58.186] (may be forged)) (authenticated bits=0) by rs73.luxsci.com (8.13.8/8.13.8) with ESMTP id o9P7cC3E019648; Mon, 25 Oct 2010 02:38:15 -0500 Reply-To: From: "Gnanakumar" To: References: <001201cb0321$df429d40$9dc7d7c0$@com> <00ca01cb03dc$a9ffe780$fdffb680$@com> In-Reply-To: <00ca01cb03dc$a9ffe780$fdffb680$@com> Subject: pg_ctl: server does not shut down Date: Mon, 25 Oct 2010 13:06:30 +0530 Organization: Zoniac Software Private Limited Message-ID: <002d01cb7417$595f78d0$0c1e6a70$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcsDIdmsbIADJ47YRMav4sbU9E4TXQAt16kgHA4oXBA= Content-Language: en-us X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.486 tagged_above=-10 required=5 tests=BAYES_00=-1.9, MAY_BE_FORGED=1.414 X-Spam-Level: X-Archive-Number: 201010/175 X-Sequence-Number: 35916 Hi, My production server is running PostgreSQL v8.2.3 on CentOS release 5.2 (Final). I've setup PITR in my production server. For some reason, after setting up PITR, we're not able to manage and maintain it. PITR SETUP DETAILS We've 2 drives. Primary drive (pgsql/data/ directory resides) is 400 GB and secondary drive (WAL archive) is 300 GB. All WAL archives are written to secondary drive. Base backup taken on: Aug03, 2009 WAL archive drive become full (100% use) on: Jul01, 2010 Because this WAL archive drive has become full, all WAL archive segments to be archived are accumulated into pg_xlog/ directory itself. Eventually, almost 4 months (as of today from Jul01, 2010) of WAL archives are residing in pg_xlog/ directory. ISSUE We then decided to stop PITR in our database. Steps which I followed are: 1. service postgresql stop 2. Detached (unmounted) 300 GB secondary drive (WAL archive) 3. Disabled WAL archiving by commenting (#) 2 postgresql.conf parameters: "archive_command" and "archive_timeout". 4. service postgresql start Now, the database has started without any issues. But when I tried to stop database using 'service postgresql stop' within few minutes after it's been started, it was not shutting down and responded with the following message after few minutes: "Stopping PostgreSQL: pg_ctl: server does not shut down" I even checked serverlog for whether any errors/issues are reported, but I don't find any. Also, when I tried to login to my database at this time, it says: psql mydb mydbuser psql: FATAL: the database system is shutting down but not actually shutting down ever. I'm clueless why it is happening so and not shutting down ever. My questions are: 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? 3. Considering this situation, now how do I safely disable PITR in my database? Experts advice/idea/suggestion on this are appreciated. Regards, Gnanam