If I create an index CONCURRENTLY in PostgreSQL, how can I see when it is finished?
I am attempting to rebuild indexes to solve index bloat, and I need to keep the old index around for a while until the new one has finished, so I need to know when it's finished.
This is PostgreSQL 9.2/3ish
concurrently
does not mean "in the background". It will still run synchronously - it simply does not take locks on the table to allow concurrent modification to the underlying table. So as soon as yourcreate index
is finished, the index is built – a_horse_with_no_name Mar 11 at 10:23