Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W1QRk-00024E-V2 for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jan 2014 00:59:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W1QRk-0002cK-BS for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jan 2014 00:59:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W1QRj-0002bD-1N for pgsql-hackers@postgresql.org; Fri, 10 Jan 2014 00:59:35 +0000 Received: from 99-153-64-76.uvs.austtx.sbcglobal.net ([99.153.64.76] helo=noel.decibel.org) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W1QRc-000563-Vq for pgsql-hackers@postgresql.org; Fri, 10 Jan 2014 00:59:32 +0000 Received: from decina.local (rrcs-67-79-71-90.sw.biz.rr.com [67.79.71.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by noel.decibel.org (Postfix) with ESMTPSA id 9B29F6D45D; Fri, 10 Jan 2014 00:59:23 +0000 (UTC) Message-ID: <52CF45E8.6090208@nasby.net> Date: Thu, 09 Jan 2014 18:59:20 -0600 From: Jim Nasby User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Michael Paquier , PostgreSQL mailing lists Subject: Re: REINDEX CONCURRENTLY 2.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.9 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Sorry for the lateness of this... On 11/14/13, 8:40 PM, Michael Paquier wrote: > + /* > + * Phase 4 of REINDEX CONCURRENTLY > + * > + * Now that the concurrent indexes have been validated could be used, > + * we need to swap each concurrent index with its corresponding old index. > + * Note that the concurrent index used for swaping is not marked as valid > + * because we need to keep the former index and the concurrent index with > + * a different valid status to avoid an implosion in the number of indexes > + * a parent relation could have if this operation fails multiple times in > + * a row due to a reason or another. Note that we already know thanks to > + * validation step that > + */ > + Was there supposed to be more to that comment? In the loop right below it... + /* Swap the indexes and mark the indexes that have the old data as invalid */ + forboth(lc, indexIds, lc2, concurrentIndexIds) ... + CacheInvalidateRelcacheByRelid(relOid); Do we actually need to invalidate the cache on each case? Is it because we're grabbing a new transaction each time through? -- Jim C. Nasby, Data Architect jim@nasby.net 512.569.9461 (cell) http://jim.nasby.net -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers