Check out example codes for "create new index takes long time postgresql". It will help you in understanding the concepts better.

Code Example 1

Create index with concurrency : 
CREATE INDEX CONCURRENTLY users_name_idx ON users(name);

Learn ReactJs, React Native from akashmittal.com