Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id E4C46B5DC0E for ; Tue, 24 May 2011 18:06:16 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 46328-01 for ; Tue, 24 May 2011 21:06:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.9]) by mail.postgresql.org (Postfix) with ESMTP id 9A18BB5DBDD for ; Tue, 24 May 2011 18:06:09 -0300 (ADT) Received: from [192.168.1.6] (mail.highperformancepostgresql.com [71.179.240.8]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0MHYWy-1QLfQ43BjI-003Nzv; Tue, 24 May 2011 23:06:09 +0200 Message-ID: <4DDC1DBF.3050306@2ndQuadrant.com> Date: Tue, 24 May 2011 17:06:07 -0400 From: Greg Smith User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110505 Icedove/3.0.11 MIME-Version: 1.0 To: Alvaro Herrera CC: pgsql-docs Subject: Re: Improve warnings around CREATE INDEX CONCURRENTLY References: <4DDB64CB.7070109@2ndQuadrant.com> <1306269968-sup-2890@alvh.no-ip.org> In-Reply-To: <1306269968-sup-2890@alvh.no-ip.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:oKmWmSXgsps1d+tO4FAk7kuDBIiFrZRjLbgNaDpG2M0 FcIEEj5+fWxWlgihluQYla6cdMqx7IzH4pS5RpZshyKCxUttU2 UeBe7N24fWHoehNFCfH5MKkRlVmXbZfVB7UaVrdi7NYprhI3/w Q5s+c3Nnci4HudrEbtkFjcaUUh3rblO6pw0kjg2mHNyyzr4Xcn m5LuwLY2wZK/Te1zfBo8ne1L6Uc2zLPlnWdWmRbqck= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201105/80 X-Sequence-Number: 6755 On 05/24/2011 04:48 PM, Alvaro Herrera wrote: > Excerpts from Greg Smith's message of mar may 24 03:56:59 -0400 2011: > > >> What makes it worse is that the wait shows up as a virtualxid one, which >> doesn't pop up on many common samples of things to look for in >> pg_locks. It would be reasonable but also incorrect for admins to >> assume a table one would be visible if running into the case alluded to >> in the docs. The serial way locks are obtained is unexpected too. >> > Incidentally, this is one of the things that Jim Nasby wanted exposed > somehow so that these problems are more easily diagnosed. I dropped the > ball on that one, but I'll be picking it up again at some point. > I don't remember seeing anything about that before, but then again I wasn't really looking for it until now. Did you have a basic idea what you wanted to do there? I have enough of this work queued up now that I may end up poking at the code myself here soon. The first thing I was considering was dropping some DEBUG2 level logging about the various phases of the reindex into there. Given that concurrent index creation has all these single instance requirements and long runtimes, I find myself putting them into scripts that do all the work as background processes. If I could set client_min_messages=debug2 when starting the script, and see more info about the progress as it happens appear in the script's output log, that is something I think many admins would choose to do. Not the ideal UI for exposing this info, certainly. But a really easy one to add, and realistically I think it would be enough to resolve most of the transparency complaints here. The biggest problem is not even documenting where people should be looking toward suspiciously, which I think the doc patch I submitted helps with. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us