Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gAETo-0007ZA-MI for pgsql-general@arkaria.postgresql.org; Wed, 10 Oct 2018 13:24:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gAETm-0004o3-6t for pgsql-general@arkaria.postgresql.org; Wed, 10 Oct 2018 13:24:46 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gAETk-0004nw-5m for pgsql-general@lists.postgresql.org; Wed, 10 Oct 2018 13:24:46 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gAETb-0005Wh-0B for pgsql-general@lists.postgresql.org; Wed, 10 Oct 2018 13:24:42 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 4E8CC2204F; Wed, 10 Oct 2018 09:24:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 10 Oct 2018 09:24:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=R wzeaQLrHHvGUelcDun8PP8QMolAfAsn3fo91jsH8y4=; b=k6Hb8JtxpMgMdq9mN hs9v4KAO8To45bH7XEg4IMJSkg8Qrb8sZrGbCorAWQn3gDOdu7W4nCsnbWLL/aZL NVOfppTqs0MADZ1m0WTK5oLGGzHDL4M5GZIzFeyMlz5GBNFDRvr8SF4nnxL7dw// bWBARb5ssvDnv8ldbrYqxn8/kV1MVglMgChEuBRMM11rP9ccgFe69mkmQP9TNqtA pgF1mp00KNqs5oaWMXgp+/PEDaSSM11GRwtrUkHSg76qC//fzYx90wiLhlaA9gNE b9vElghnQw6xICusRuI75e8jV4tOt1rQD9hAkZJ+3zdsve+PkB9qJX09V2tB0L/s QJCnQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=RwzeaQLrHHvGUelcDun8PP8QMolAfAsn3fo91jsH8 y4=; b=j/gBiEY6z282n8vA7K6CaOVZWyvOw7eVEXGUzM8DemeQCQNtTsv9U1dCd SNfqSmTjK5xzd4SE4GxGj0TUc9HNxCk5W76xlsplHt45TzMFSgcu2ec4ha68hXCN rFqD+Umf7GeIqpCjDv8hEwN4BJotIiND9GlAQm7fXdZG60+bAI1bEmRM9TidYycg erx3l1lvSSOMQ2+kNhZDdPHuQAUs7o8rw/E74phBCP21uTwBP40zmRy6JRVRmauJ O9AI8XZrU+Sn1YkLwCfy+6qvpxcwNxX8Su1fqXPLEUuCI5L8rBoNpkYiyvjAQAb7 L79CoWGE/OZGbV3O5fnE10opqfEZQ== X-ME-Sender: X-ME-Proxy: Received: from [192.168.1.3] (unknown [71.212.134.3]) by mail.messagingengine.com (Postfix) with ESMTPA id 710BBE46B8; Wed, 10 Oct 2018 09:24:32 -0400 (EDT) Subject: Re: RHEL 7 (systemd) reboot To: Bryce Pepper , "pgsql-general@lists.postgresql.org" References: <49f8b4546d9948d798d81e1fd32bfb4f@WNEXMBFEP03.KCSCP.CORP> <532b0c39-6b76-658f-fe45-852dd964d7ba@aklaver.com> <5de197dc0e9241c59caad6cb3f69ef25@WNEXMBFEP03.KCSCP.CORP> From: Adrian Klaver Message-ID: <5c30d3c8-ddd0-452c-a667-cb1356c10c47@aklaver.com> Date: Wed, 10 Oct 2018 06:24:30 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <5de197dc0e9241c59caad6cb3f69ef25@WNEXMBFEP03.KCSCP.CORP> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 10/10/18 5:32 AM, Bryce Pepper wrote: > Adrian, > Thanks for the inquiry. The function (db_execute_sql) is coming from a vendor (BMC) product called Control-M. It is a scheduling product. > The tmp file is deleted before I can see its contents but I believe it is trying to update some columns in the CMS_SYSPRM table. > I also think the postgresql instance is already stopped and hence why the db_execute fails. I will try to modify the vendor function to save off the contents of the query. Alright, I'm confused. In your earlier post you said the stop script is not running. Yet here it is, just not at the right time. I think a more detailed explanation is needed: 1) The stop script you are concerned about is a systemd script, one that you created or system provided? 2) What is the shutdown service you refer to? 3) Is there a separate shutdown script for the Control-M product? 4) What do you expect to happen vs what is happening? > > Bryce > > p.s. Do you know of any verbose logging that could be turned on to catch when pgsql is being terminated? > > > -----Original Message----- > From: Adrian Klaver > Sent: Tuesday, October 09, 2018 7:39 PM > To: Bryce Pepper ; pgsql-general@lists.postgresql.org > Subject: Re: RHEL 7 (systemd) reboot > > This email originated from outside the company. Please use caution when opening attachments or clicking on links. If you suspect this to be a phishing attempt, please report via PhishAlarm. > ________________________________ > > On 10/9/18 11:06 AM, Bryce Pepper wrote: >> I am running three instances (under different users) on a RHEL 7 >> server to support a vendor product. >> >> In the defined services, the start & stop scripts work fine when >> invoked with systemctl {start|stop} whatever.service but we have >> automated monthly patching which does a reboot. >> >> Looking in /var/log/messages and the stop scripts do not get invoked >> on reboot, therefore I created a new shutdown service as described >> here . >> >> It appears that PostGreSQL is receiving a signal from somewhere prior >> to my script running. >> > >> >> The database must be available for the product to shut down in a >> consistent state. >> >> I am open to suggestions. > > What is the below doing or coming from?: > > db_execute_sql failed while processing > /data00/ctmlinux/ctm_server/tmp/upd_CMS_SYSPRM_29448. > >> >> Thanks, >> >> Bryce >> >> *Bryce Pepper* >> >> Sr. Unix Applications Systems Engineer >> >> *The Kansas City Southern Railway Company * >> >> 114 West 11^th Street |  Kansas City, MO 64105 >> >> Office: 816.983.1512 >> >> Email: bpepper@kcsouthern.com >> > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com