Re: Bugs in CREATE/DROP INDEX CONCURRENTLY

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Kevin Grittner" <kgrittn@mail.com>
Cc: "Simon Riggs" <simon@2ndQuadrant.com>, pgsql-hackers@postgresql.org
Date: 2012-10-17T23:31:31Z
Lists: pgsql-hackers
"Kevin Grittner" <kgrittn@mail.com> writes:
> To put that another way, it should be done at a time when it is sure
> that no query sees indisvalid = true and no query has yet seen
> indisready = false. Patch attached. Will apply if nobody sees a
> problem with it.

The above statement of the requirement doesn't seem to match what you
put in the comment:

> + 	 * All predicate locks on the index are about to be made invalid. Promote
> + 	 * them to relation locks on the heap. For correctness this must be done
> + 	 * after the index was last seen with indisready = true and before it is
> + 	 * seen with indisvalid = false.

and the comment is rather vaguely worded too (last seen by what?).
Please wordsmith that a bit more.

			regards, tom lane