Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j1JlK-0003N2-2L for pgsql-general@arkaria.postgresql.org; Tue, 11 Feb 2020 00:50:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j1JlH-0002oM-Qr for pgsql-general@arkaria.postgresql.org; Tue, 11 Feb 2020 00:50:47 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1j1JlH-0002oF-1U for pgsql-general@lists.postgresql.org; Tue, 11 Feb 2020 00:50:47 +0000 Received: from resqmta-ch2-03v.sys.comcast.net ([2001:558:fe21:29:69:252:207:35]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j1JlC-0000DU-S1 for pgsql-general@postgresql.org; Tue, 11 Feb 2020 00:50:46 +0000 Received: from resomta-ch2-15v.sys.comcast.net ([69.252.207.111]) by resqmta-ch2-03v.sys.comcast.net with ESMTP id 1JFnjNDfs8K6O1Jl6jW8pr; Tue, 11 Feb 2020 00:50:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1581382236; bh=bbzEHmJ95ou9H/lX3cUpvUicySs5sqLmXUs7jOYz1g8=; h=Received:Received:Received:From:To:Subject:Date:Message-ID: MIME-Version:Content-Type; b=OD0G1QrQPY83rDrAXlHq49qFsuf3FuV754gJgTCAL4ERsRF2xDxvlluZdbdd5hyaU vltKmIcPhCRgN4N8OggmNJex3HefS1CdWJwy0OPyn0E2qfG9pkRr5ZYyOqtVCHwjT3 98uhB6snNT4K1UtMtA7zoIfSskYYbJVh8onE9NzUMQxcnkOvzSKV6dg1uTWa120vj+ FaNMzrJELultFB1TeCGKHMufRFr88jLcpnBmXNPnB/7lJbuJ98cT8Ze3lrHX2bmiPe zu2rZgjfW/j8BR1HCJl7QpSbjvd10KV3YniKqzAWRfI023HIo4co6zc2qnuSpELe7+ yxfS0zwyexSzQ== Received: from jsievers.comcast.net ([12.187.116.132]) by resomta-ch2-15v.sys.comcast.net with ESMTPA id 1JkyjBs1FfW051JkyjcsT6; Tue, 11 Feb 2020 00:50:34 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgedugedriedvgddviecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucevohhmtggrshhtqdftvghsihdpqfgfvfdppffquffrtefokffrnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpeflvghrrhihucfuihgvvhgvrhhsuceoghhsihgvvhgvrhhsudelsegtohhmtggrshhtrdhnvghtqeenucffohhmrghinheprghrtghitghtrdgtohhmnecukfhppeduvddrudekjedrudduiedrudefvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopehjshhivghvvghrshdrtghomhgtrghsthdrnhgvthdpihhnvghtpeduvddrudekjedrudduiedrudefvddpmhgrihhlfhhrohhmpehgshhivghvvghrshduleestghomhgtrghsthdrnhgvthdprhgtphhtthhopehpohhsthhgrhgvshesrghrtghitghtrdgtohhmpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrhgrlhesphhoshhtghhrvghsqhhlrdhorhhg X-Xfinity-VMeta: sc=0.00;st=legit Received: from jsievers.enova.com (localhost [127.0.0.1]) by jsievers.comcast.net (Postfix) with ESMTP id D099726005A; Mon, 10 Feb 2020 18:50:27 -0600 (CST) From: Jerry Sievers To: Marc Cc: pgsql-general Subject: Re: Postgres 12.1 : UPPER() in WHERE clause restarts server References: <24448274-3B25-411F-8A9D-286E2EFDC65F@arcict.com> Date: Mon, 10 Feb 2020 18:50:27 -0600 In-Reply-To: <24448274-3B25-411F-8A9D-286E2EFDC65F@arcict.com> (Marc's message of "Sun, 09 Feb 2020 16:35:12 +0100") Message-ID: <87blq6vtf0.fsf@jsievers.enova.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Marc writes: > Adrian, Christoph, Tom, > > We identified as the problem being persistent on all tables with many > records ( +600K ) and they all had a JSONB column ( we feel that > might be related ) Did you remember to re-analyze all tables after importing the data? Autovac probably will have done it for you for objects non-trivial in size, but it's worth asking. Such an omission could certainly result in poor exec plans, large memory use and in turn automated intervention. FWIW > > Luckily we were able to downgraded to version 11.6 with the same > system MacOS 10.14.6 so that the OS impact can ruled out. > > We will keep the 12.1 in place so that we can run additional tests to > assist to pin-point the issue. > > Feel free to ask but allow us to recover from these hectic days ;-) > > Many thanks for the help ! > > > > Marc > > > On 8 Feb 2020, at 21:09, Nick Renders wrote: > > Hi, > > We have just upgraded our Postgres 9.6 database to 12.1 > (pg_dumpall -> pg_restore on a clean installation) and now we are > having some issues with one of our tables. > > When we do the following statement: > > SELECT * FROM f_gsxws_schedule WHERE UPPER(gwsc_dossier) = 'TEST' > > the Postgres service restarts. > > It seems that using UPPER() in the WHERE clause is causing this. > The same statement without UPPER() works just fine. > > I have tried to emulate the issue with other tables, but > f_gsxws_schedule seems to be the only one. > The table also has another character field that is indexed, and > the same problem occurs there. Whenever we use UPPER() or LOWER() > to do a case-insensitive search, the service reboots. > > Looking at the table's definition, I don't see anything different > with the other tables. > > Here is what is logged: > > 2020-02-08 20:21:19.942 CET [83892] LOG: server process (PID > 85456) was terminated by signal 9: Killed: 9 > 2020-02-08 20:21:19.942 CET [83892] DETAIL: Failed process was > running: SELECT * FROM f_gsxws_schedule WHERE UPPER(gwsc_dossier) > = 'TEST' > 2020-02-08 20:21:19.942 CET [83892] LOG: terminating any other > active server processes > 2020-02-08 20:21:19.943 CET [85364] WARNING: terminating > connection because of crash of another server process > 2020-02-08 20:21:19.943 CET [85364] DETAIL: The postmaster has > commanded this server process to roll back the current > transaction and exit, because another server process exited > abnormally and possibly corrupted shared memory. > 2020-02-08 20:21:19.943 CET [85364] HINT: In a moment you should > be able to reconnect to the database and repeat your command. > 2020-02-08 20:21:19.943 CET [85360] WARNING: terminating > connection because of crash of another server process > 2020-02-08 20:21:19.943 CET [85360] DETAIL: The postmaster has > commanded this server process to roll back the current > transaction and exit, because another server process exited > abnormally and possibly corrupted shared memory. > 2020-02-08 20:21:19.943 CET [85360] HINT: In a moment you should > be able to reconnect to the database and repeat your command. > 2020-02-08 20:21:19.943 CET [85269] WARNING: terminating > connection because of crash of another server process > 2020-02-08 20:21:19.943 CET [85269] DETAIL: The postmaster has > commanded this server process to roll back the current > transaction and exit, because another server process exited > abnormally and possibly corrupted shared memory. > 2020-02-08 20:21:19.943 CET [85269] HINT: In a moment you should > be able to reconnect to the database and repeat your command. > 2020-02-08 20:21:19.946 CET [83892] LOG: all server processes > terminated; reinitializing > 2020-02-08 20:21:19.988 CET [85686] LOG: database system was > interrupted; last known up at 2020-02-08 20:20:48 CET > 2020-02-08 20:21:20.658 CET [85686] LOG: database system was not > properly shut down; automatic recovery in progress > 2020-02-08 20:21:20.662 CET [85686] LOG: redo starts at C/ > B99B45A0 > 2020-02-08 20:21:20.662 CET [85686] LOG: invalid record length at > C/B99B4688: wanted 24, got 0 > 2020-02-08 20:21:20.662 CET [85686] LOG: redo done at C/B99B4650 > 2020-02-08 20:21:20.675 CET [83892] LOG: database system is ready > to accept connections > > > Has anyone noticed anything like this before? Any idea how to fix > this? > > > Best regards, > > Nick Renders > > > > ARC - your Apple Authorised Service H.D. Saviolaan 8 > partner > B-1700 Dilbeek > Belgium > info@arcict.com www.arcict.com > tel. : +32 (0)2 466 50 00 fax. : +32 (0)2 466 88 33 > > > > -- Jerry Sievers Postgres DBA/Development Consulting e: postgres.consulting@comcast.net