Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eGqIM-0002xD-1d for pgsql-bugs@arkaria.postgresql.org; Mon, 20 Nov 2017 17:55:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eGqIL-0001CM-HM for pgsql-bugs@arkaria.postgresql.org; Mon, 20 Nov 2017 17:55:45 +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.84_2) (envelope-from ) id 1eGqI1-0007m2-Dd for pgsql-bugs@lists.postgresql.org; Mon, 20 Nov 2017 17:55:25 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eGqHx-0005X0-DE for pgsql-bugs@postgresql.org; Mon, 20 Nov 2017 17:55:23 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id vAKHtIYO017459; Mon, 20 Nov 2017 12:55:18 -0500 From: Tom Lane To: Boris Sagadin cc: Michael Paquier , PostgreSQL mailing lists Subject: Re: BUG #14917: process hang on create index In-reply-to: References: <20171117112600.1465.35972@wrigleys.postgresql.org> <7707.1511020457@sss.pgh.pa.us> Comments: In-reply-to Boris Sagadin message dated "Mon, 20 Nov 2017 09:24:53 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17457.1511200518.1@sss.pgh.pa.us> Date: Mon, 20 Nov 2017 12:55:18 -0500 Message-ID: <17458.1511200518@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Boris Sagadin writes: > Thanks Tom, I made a few traces on the process, one at the beginning and a > few later when it seems stuck, below is the output. Well, it looks to me like it's not hung, it's just busy sorting. It is making progress, since the successive traces show different values being compared. 97% of the runtime in strcoll() is a bit weird. strcoll() is known to be unpleasantly slow in some locales, but that seems excessive. Perhaps you've discovered a performance bug in strcoll() for certain input data. That wouldn't be our problem though --- you'd need to complain to the glibc maintainers. It'd be interesting to dump out the data in that column into a text file and see if sorting that with sort(1) (in the same locale!) is equally slow. If it is, that would confirm the assignment of blame to strcoll(). But the glibc folk would want to see sample data too, so one way or another you're going to need to sanitize that data enough to show it to somebody else. regards, tom lane