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 1gADfH-00058r-7l for pgsql-general@arkaria.postgresql.org; Wed, 10 Oct 2018 12:32:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gADfF-0000t6-88 for pgsql-general@arkaria.postgresql.org; Wed, 10 Oct 2018 12:32:33 +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 1gADfE-0000sy-Sm for pgsql-general@lists.postgresql.org; Wed, 10 Oct 2018 12:32:33 +0000 Received: from mail1.bemta24.messagelabs.com ([67.219.250.3]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gADfA-0004Aw-R1 for pgsql-general@lists.postgresql.org; Wed, 10 Oct 2018 12:32:30 +0000 Received: from [67.219.250.96] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-3.bemta.az-a.us-west-2.aws.symcld.net id D4/87-08863-B51FDBB5; Wed, 10 Oct 2018 12:32:27 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOKsWRWlGSWpSXmKPExsVyLFFORjf6495 og6mbuCw+PT3HanFm3iFmByaPg7OnMHocbSoMYIpizcxLyq9IYM04+ecfS8FMoYreRfeZGxgX 8XcxcnIICWxglDg+nauLkQvIns0ocfjwX1aQBJuAtsT32UeBbA4OEYFKie+NhSBhYQEViTkd1 8BKRARUJf5tbIGyjSR2NTxnBrFZgOLbv14Cs3kFXCWu7V3PDLGrUmL91Z/sICM5BewlunqlQc KMAmIS30+tYQKxmQXEJW49mQ9mSwgISCzZc54ZwhaVePn4HyuEbSCxdek+FghbXmJeyyM2iF4 9iRtTp0DZ2hLLFr6GOkFQ4uTMJywTGEVmIVkxC0nLLCQts5C0LGBkWcVokVSUmZ5RkpuYmaNr aGCga2hopGtobKhraGSpl1ilm6hXWqxbnlpcomukl1herFdcmZuck6KXl1qyiREYRSkFzY07G PesSD/EKMnBpCTK2+W+N1qILyk/pTIjsTgjvqg0J7X4EKMMB4eSBO/GD0A5waLU9NSKtMwcYD zDpCU4eJREeP1A0rzFBYm5xZnpEKlTjPYc/xb8n87M0fb0+gxmjg4w+WbujxnMQix5+XmpUuK 8lSBtAiBtGaV5cENh6ecSo6yUMC8jAwODEE9BalFuZgmq/CtGcQ5GJWHeUyBTeDLzSuB2vwI6 iwnorFMhe0DOKklESEk1ME7eoHVebddP/+YXK1v4zmwSXLzaaWvivi3PjdmamNs3LpKtEfln9 1Y64K/38sSAvjMPg9o/FEU7t30TTv+94Yf2X7sXd95zux5WPHFvjrVLwuwZHF/DXu9o3/zWrv 6Tasq+czmffeLd4n5/ilfr+Lrj2t/TH27YsFslZ3gyn7MRnWFUc3XnKwUlluKMREMt5qLiRAC ltQqDOgMAAA== X-Env-Sender: BPepper@KCSouthern.com X-Msg-Ref: server-36.tower-320.messagelabs.com!1539174746!336738!1 X-Originating-IP: [198.97.30.28] X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.14.24; banners=-,-,- X-VirusChecked: Checked Received: (qmail 30091 invoked from network); 10 Oct 2018 12:32:27 -0000 Received: from unknown (HELO WNEXMBFEP02.KCSCP.CORP) (198.97.30.28) by server-36.tower-320.messagelabs.com with AES256-SHA encrypted SMTP; 10 Oct 2018 12:32:27 -0000 Received: from WNEXMBFEP03.KCSCP.CORP (10.160.10.82) by WNEXMBFEP02.KCSCP.CORP (10.160.10.81) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 10 Oct 2018 07:32:25 -0500 Received: from WNEXMBFEP03.KCSCP.CORP ([10.2.50.29]) by WNEXMBFEP03.KCSCP.CORP ([10.2.50.29]) with mapi id 15.00.1395.000; Wed, 10 Oct 2018 07:32:25 -0500 From: Bryce Pepper To: Adrian Klaver , "pgsql-general@lists.postgresql.org" Subject: RE: RHEL 7 (systemd) reboot Thread-Topic: RHEL 7 (systemd) reboot Thread-Index: AQHUYDGb7Z4qaT00YEeh50+WkxR0A6UYZy4w Date: Wed, 10 Oct 2018 12:32:25 +0000 Message-ID: <5de197dc0e9241c59caad6cb3f69ef25@WNEXMBFEP03.KCSCP.CORP> References: <49f8b4546d9948d798d81e1fd32bfb4f@WNEXMBFEP03.KCSCP.CORP> <532b0c39-6b76-658f-fe45-852dd964d7ba@aklaver.com> In-Reply-To: <532b0c39-6b76-658f-fe45-852dd964d7ba@aklaver.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.90.65.98] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Adrian, Thanks for the inquiry. The function (db_execute_sql) is coming from a ven= dor (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 t= rying to update some columns in the CMS_SYSPRM table.=20 I also think the postgresql instance is already stopped and hence why the d= b_execute fails. I will try to modify the vendor function to save off the = contents of the query. Bryce p.s. Do you know of any verbose logging that could be turned on to catch wh= en pgsql is being terminated? -----Original Message----- From: Adrian Klaver =20 Sent: Tuesday, October 09, 2018 7:39 PM To: Bryce Pepper ; pgsql-general@lists.postgresql.o= rg Subject: Re: RHEL 7 (systemd) reboot This email originated from outside the company. Please use caution when ope= ning 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=20 > server to support a vendor product. > > In the defined services, the start & stop scripts work fine when=20 > invoked with systemctl {start|stop} whatever.service but we have=20 > automated monthly patching which does a reboot. > > Looking in /var/log/messages and the stop scripts do not get invoked=20 > on reboot, therefore I created a new shutdown service as described=20 > here . > > It appears that PostGreSQL is receiving a signal from somewhere prior=20 > to my script running. > > > The database must be available for the product to shut down in a=20 > 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 |=A0 Kansas City, MO 64105 > > Office: 816.983.1512 > > Email: bpepper@kcsouthern.com > -- Adrian Klaver adrian.klaver@aklaver.com