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 1fRNxj-00072W-UW for pgsql-general@arkaria.postgresql.org; Fri, 08 Jun 2018 20:26:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fRNxi-0000wt-Gm for pgsql-general@arkaria.postgresql.org; Fri, 08 Jun 2018 20:26:18 +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 1fRNxi-0000vE-4L for pgsql-general@lists.postgresql.org; Fri, 08 Jun 2018 20:26:18 +0000 Received: from mail.wordtothewise.com ([2001:470:1:6d::9a]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fRNxe-000591-4i for pgsql-general@lists.postgresql.org; Fri, 08 Jun 2018 20:26:16 +0000 Received: from satsuke.wordtothewise.com (204.11.227.194.static.etheric.net [204.11.227.194]) by mail.wordtothewise.com (Postfix) with ESMTPSA id D27FD2337B; Fri, 8 Jun 2018 13:27:14 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Performance problem postgresql 9.5 From: Steve Atkins In-Reply-To: <20180608200954.ktjpp6hs6orkvvdg@alvherre.pgsql> Date: Fri, 8 Jun 2018 13:26:12 -0700 Cc: Miguel Angel Sanchez Sandoval Content-Transfer-Encoding: quoted-printable Message-Id: <25583401-FBA5-4FCE-A39C-50741A0537C9@blighty.com> References: <20180608200954.ktjpp6hs6orkvvdg@alvherre.pgsql> To: "pgsql-generallists.postgresql.org" X-Mailer: Apple Mail (2.3273) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Jun 8, 2018, at 1:09 PM, Alvaro Herrera = wrote: >=20 > On 2018-Jun-08, Miguel Angel Sanchez Sandoval wrote: >=20 >> Hi guys, migrate from 8.4 to 9.5, all OK except that 2-3 days pass = and the >> database experiences slowness, I execute the linux top command and it = shows >> me a postgres user process executing a strange command = (2yhdgrfrt63788) >> that I consume a lot of CPU, I see the querys active and encounter = select >> fun ('./ 2yhdgrfrt63788') , this did not happen in version 8.4, any = help >> would appreciate it. >=20 > Hmm, has your database been compromised? You may have an intruder = there -- > beware. Definitely. The machine is compromised and doing Bad Things. Image it if possible; save the compromise payload you know about if not. Treat it as compromised and unsafe to attach to a network until you = completely wipe and reinstall it. It's probably a compromise via postgresql open to the network with = insecure settings. I've seen several of those reported recently, and = this one is saving it's payload to the postgresql data directory - = somewhere no other user or app will have access to, but which a = compromised postgresql can easily write to. Check the pg_hba.conf and packet filter / firewall settings and see what = the issue may be. Do the same checks on all your other postgresql = servers, test and production. If there's a configuration mistake that = let one server be compromised it's may well be there on others too. Unless you are positive the server was not attacked, don't trust it = unless you can be absolutely certain it is clean. Best bet is to backup = any critical data (and check it for trustworthiness), wipe and rebuild. Cheers, Steve