Having trouble creating unique index on a table. Statement fails with following message
>CREATE UNIQUE INDEX CONCURRENTLY my_table_pkey_new ON my_table (new_id);
ERROR: canceling statement due to lock timeout
It is not clear why I get lock timeout. Concurrent index creation shouldn't lock the table.
I also tried to increase lock timeout but without success
test=> show lock_timeout;
lock_timeout
--------------
5min
(1 row)
test=> set lock_timeout to 99999999;
SET
test=> show lock_timeout;
lock_timeout
--------------
5min
(1 row)