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 1gHAl5-0004rk-Ap for pgsql-bugs@arkaria.postgresql.org; Mon, 29 Oct 2018 16:51:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gHAl3-0004rF-Gl for pgsql-bugs@arkaria.postgresql.org; Mon, 29 Oct 2018 16:51:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gHAl3-0004r6-7F for pgsql-bugs@lists.postgresql.org; Mon, 29 Oct 2018 16:51:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gHAl0-0006ZL-Lw for pgsql-bugs@lists.postgresql.org; Mon, 29 Oct 2018 16:51:16 +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 w9TGp31X008331; Mon, 29 Oct 2018 12:51:03 -0400 From: Tom Lane To: Peter Geoghegan cc: paul.vanderlinden@mapcreator.eu, PostgreSQL mailing lists , Heikki Linnakangas Subject: Re: BUG #15460: Error while creating index or constraint In-reply-to: References: <15460-b6db80de822fa0ad@postgresql.org> <27191.1540827070@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Mon, 29 Oct 2018 16:38:07 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <8329.1540831863.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 29 Oct 2018 12:51:03 -0400 Message-ID: <8330.1540831863@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Geoghegan writes: > On Mon, Oct 29, 2018 at 3:31 PM Tom Lane wrote: >>> LOG: performsort of 0 done: CPU: user: 250.03 s, system: 42.66 s, ela= psed: 294.35 s >>> LOG: parallel external sort of 0 ended, 462886 disk blocks used: CPU:= user: 250.03 s, system: 42.66 s, elapsed: 298.95 s >>> LOG: begin index sort: unique =3D f, workMem =3D 2096128, randomAcces= s =3D f >>> LOG: performsort of -1 starting: CPU: user: 0.00 s, system: 0.00 s, e= lapsed: 0.00 s >>> LOG: could not rmdir directory "base/pgsql_tmp/pgsql_tmp5088.0.shared= fileset": Directory not empty >>> ERROR: could not determine size of temporary file "0" >> "performsort of -1"? Seems a bit suspicious. > This just refers to the leader Tuplesortstate. It isn't suspicious. > We follow the convention that worker -1 is the leader within > tuplesort.c. Hmm. But the sort of "0" has already completed, according to the first couple of log lines I quoted. Why is something still trying to access it? Why is a worker trying to do anything at all with the leader's Tuplesortstate? > trace_sort is a developer option, so this seems fine to me. That's a poor excuse for ignoring the message style guidelines. There are many reasons why even experts could get confused trying to follow badly-written messages. regards, tom lane