From: Jim Nasby <jim@nasby.net>
To: Michael Paquier <michael.paquier@gmail.com>
To: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: REINDEX CONCURRENTLY 2.0
Date: Thu, 09 Jan 2014 18:59:20 -0600
Message-ID: <52CF45E8.6090208@nasby.net> (raw)
In-Reply-To: <CAB7nPqSTFkuc7dZxCDX4HOTU63YXHRroNv2aoUzyD-Zz_8Z_Zg@mail.gmail.com>
References: <CAB7nPqSTFkuc7dZxCDX4HOTU63YXHRroNv2aoUzyD-Zz_8Z_Zg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: jim@nasby.net, michael.paquier@gmail.com
Subject: Re: REINDEX CONCURRENTLY 2.0
In-Reply-To: <52CF45E8.6090208@nasby.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox