Re: Creating indexes in the background

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Creating indexes in the background
Дата
Msg-id CAB7nPqRWuEoy6hFhN=JLR3R-OzeyRthUte7JnSitEZgz8_qUKA@mail.gmail.com
обсуждение исходный текст
Ответ на Creating indexes in the background  (David Lee <davidomundo@gmail.com>)
Список pgsql-hackers


On Sun, Oct 28, 2012 at 8:20 AM, David Lee <davidomundo@gmail.com> wrote:
Hey folks,

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.
--
Michael Paquier
http://michael.otacoo.com

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Index creation in postgresql
Следующее
От: Amit Kapila
Дата:
Сообщение: Proposal for Allow postgresql.conf values to be changed via SQL