It seems like right now when you want to create an index concurrently, the index creation will get canceled if you cancel the statement (i.e. you must keep your statement open).
Is there a way to "launch" an index creation in the background so that the statement doesn't need to be kept open?
If I understood your question, the answer is no, you need to maintain the server session alive when doing a transaction on a PG server, cutting the server connection automatically aborts the transaction it is running on server side. You can still use a batch processing for doing such operations like: psql -c "create index concurrently foo on tab(a)" -p $port -h $host $dbname & But this needs to be done on the client application side that will maintain alive a session on server.