Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 2D66151279 for ; Thu, 26 Jan 2012 04:08:45 -0400 (AST) Received: from mahout.postgresql.org ([98.129.198.123]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RqKNt-000579-6V for pgsql-bugs@postgresql.org; Thu, 26 Jan 2012 08:08:45 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RqKNg-0000oz-D8 for pgsql-bugs@postgresql.org; Thu, 26 Jan 2012 08:08:28 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1RqKNg-0001cd-48 for pgsql-bugs@postgresql.org; Thu, 26 Jan 2012 08:08:28 +0000 Date: Thu, 26 Jan 2012 08:08:28 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #6410: Windows say a unpleasant warning when stop a pgsql service To: pgsql-bugs@postgresql.org From: harukat@sraoss.co.jp X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201201/172 X-Sequence-Number: 32239 The following bug has been logged on the website: Bug reference: 6410 Logged by: TAKATSUKA Haruka Email address: harukat@sraoss.co.jp PostgreSQL version: 9.1.2 Operating system: Windows Server 2008 R2 Description: = (I also tested 8.3.17, 8.4.9 and 9.2-dev.) Windows say a unpleasant warning message into the eventlog when stop a pgsql service. Event ID: 1530 Log Name: Application Source: Microsoft-Windows-User Profiles Service Description: "Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards." I added the following lines to the end of pgwin32_ServiceMain() for trial, --- + Sleep(1000); pgwin32_SetServiceStatus(SERVICE_STOPPED); } --- and I confirmed that the warning message was not output. It seems this is not an essential fix, but useful to easily erase unpleasant messages.