Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gKGU9-0004kx-8l for pgsql-bugs@arkaria.postgresql.org; Wed, 07 Nov 2018 05:34:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gKGU6-0005QM-Dh for pgsql-bugs@arkaria.postgresql.org; Wed, 07 Nov 2018 05:34:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gKGU6-0005OD-7U for pgsql-bugs@lists.postgresql.org; Wed, 07 Nov 2018 05:34:34 +0000 Received: from tama50.ecl.ntt.co.jp ([129.60.39.147]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gKGU2-00045w-Fz; Wed, 07 Nov 2018 05:34:33 +0000 Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id wA75YOX5023587; Wed, 7 Nov 2018 14:34:24 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id ED699EA8A1D; Wed, 7 Nov 2018 14:34:23 +0900 (JST) Received: from jcms-pop21.ecl.ntt.co.jp (jcms-pop21.ecl.ntt.co.jp [129.60.87.134]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id E2BF2EA8A28; Wed, 7 Nov 2018 14:34:23 +0900 (JST) Received: from [127.0.0.1] (unknown [129.60.241.61]) by jcms-pop21.ecl.ntt.co.jp (Postfix) with ESMTPSA id DB464400943; Wed, 7 Nov 2018 14:34:23 +0900 (JST) Subject: Re: BUG #15489: Segfault on DELETE References: <15489-f1158ddcc2584a8e@postgresql.org> From: Amit Langote Message-ID: <26334113-2b97-db62-b72c-8066c2dedbb5@lab.ntt.co.jp> Date: Wed, 7 Nov 2018 14:34:12 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <15489-f1158ddcc2584a8e@postgresql.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CC-Mail-RelayStamp: 1 To: kanwei@gmail.com, pgsql-bugs@lists.postgresql.org, PG Bug reporting form X-TM-AS-MML: disable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018/11/07 14:01, PG Bug reporting form wrote: > The following bug has been logged on the website: > > Bug reference: 15489 > Logged by: Kanwei Li > Email address: kanwei@gmail.com > PostgreSQL version: 11.0 > Operating system: Debian 9 > Description: > > We started seeing a segfault crash on our postgresql 11 server instance > today when attempting to delete certain rows in the database: > > 2018-11-06 21:02:07.553 UTC [60606] LOG: server process (PID 66881) was > terminated by signal 11: Segmentation fault > 2018-11-06 21:02:07.553 UTC [60606] DETAIL: Failed process was running: > delete from integration_account > where partner_id = 24 > > Attempting to delete certain rows were causing this segfault, and attempting > to delete other rows did not. There didn't seem to be a pattern, and because > this was on production we couldn't risk playing around too much. > > Doing a SELECT on the rows that couldn't be deleted worked fine. There > didn't seem to be data corruption since all the data could be read. However, > attempting to DELETE certain rows would crash it. pg_dump also worked > fine. Are there any triggers defined on integration_account? Also, has there recently been any ALTER TABLE DROP/DROP COLUMN activity on that table? PG 11.1 to be released later this week fixed a bug that would cause segmentation fault when running triggers (including, but not limited to DELETE triggers). > What fixed it was performing a VACUUM ANALYZE on the database. After that, > the deletes worked again. Hmm, that's a bit mysterious to me if your case is really hitting the bug I'm suspecting. Thanks, Amit