Postgres - Multiple commands on table at the same time
You can't run multiple DDL statements at the same time because each statement will request an exclusive lock. So if you add a primary or foreign key, the table is locked. 

You can however create multiple indexes at the same time using the concurrently option. 

Without the concurrently this will also block write access to the table while the index is created (read access is still possible in any case).