Csaba Nagy <nagy@xxxxxxxxxxxxxx> writes: > So an implementation which optimistically builds the new index > concurrently while holding no lock, and then hopes for the 3rd > transaction to be able to get the exclusive lock and be able to swap the > new index in the place of the old index, and error out if it can't - it > is perfectly acceptable. It would maybe be acceptable if there were a way to clean up the mess after a failure, but there wouldn't be ... regards, tom lane