The following bug has been logged on the website:
Bug reference: 14768
Logged by: Marcin Barczyński
Email address: mba(dot)ogolny(at)gmail(dot)com
PostgreSQL version: 9.6.3
Operating system: Ubuntu 14.04 but most probably it doesn't matter
Description:
I am perfectly aware of the fact that CREATE INDEX CONCURRENTLY on a table
cancels a running autovacuum process on that table.
But CREATE INDEX CONCURRENTLY IF NOT EXISTS should take
ShareUpdateExclusiveLock only after checking that the index doesn't exist.