Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bOkSQ-0003D6-2p for pgsql-bugs@arkaria.postgresql.org; Sun, 17 Jul 2016 11:42:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bOkSO-0001jl-K7 for pgsql-bugs@arkaria.postgresql.org; Sun, 17 Jul 2016 11:42:00 +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 1bOkSO-0001jf-Aa for pgsql-bugs@postgresql.org; Sun, 17 Jul 2016 11:42:00 +0000 Received: from szalupa.batory.org.pl ([81.18.204.35]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bOkSL-0007cg-1h for pgsql-bugs@postgresql.org; Sun, 17 Jul 2016 11:41:59 +0000 Received: from [192.168.0.14] (095160153037.dynamic-ww-10.vectranet.pl [95.160.153.37]) (authenticated bits=0) by szalupa.batory.org.pl (8.14.4/8.14.4) with ESMTP id u6HBfoqd011060 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 17 Jul 2016 13:41:51 +0200 Subject: Re: Invalid indexes should not consume update overhead To: PostgreSQL Bugs References: <8b57a306-7951-8442-df16-8c581d61b4e6@ato.waw.pl> From: Tomasz Ostrowski Cc: Greg Stark Message-ID: <578B6F00.3080104@ato.waw.pl> Date: Sun, 17 Jul 2016 13:41:52 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 81.18.204.35 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2016-07-17 02:09, Greg Stark wrote: > The real solution imho is to actually clean up failed index builds when > a build fails. That wouldn't solve my problem, which is that I need a way to disable indexes before large update. I believe (but I'm not sure) that Oracle has this concept: ALTER INDEX [INDEX_NAME] UNUSABLE; Maybe, if an index is in invalid state, update can check which part of table is already indexed and which part is not. Then it would only update indexes of this already reindexed part of table. This way purposely invalid indexes could be marked valid for blocks numbers less than 0. This might actually be a win during concurrent index creation as concurrent updates would not have to update index for all updated rows. But I don't know if it's feasible from concurrency perspective at all. Regards, Tomasz "Tometzky" Ostrowski -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs