code: def cmd_reindex():
      
      db = connect(args.database)
      for idx in args.indexes:
          pg_reindex(db, idx)
docs: Uses CREATE INDEX CONCURRENTLY to create a duplicate index, then tries to swap the new index for the original.
  
      The index swap is done using a short lock timeout to prevent it from interfering with running queries. Retries until
      the rename succeeds.