Re: Creating indexes in the background

From: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
To: David Lee <davidomundo(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Creating indexes in the background
Date: 2012-10-28 20:19:18
Message-ID: CAJKUy5j47QarmYtaRTDNBv2GKa5gxJDGBg9EHxCZcYYHCfVt5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Oct 27, 2012 at 6:20 PM, David Lee <davidomundo(at)gmail(dot)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?
>

do it in the command line:

psql -c "CREATE INDEX CONCURRENTLY aname ON atable(acolumn)" adb &

--
Jaime Casanova www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación
Phone: +593 4 5107566 Cell: +593 987171157

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2012-10-28 21:35:36 Re: Creating indexes in the background
Previous Message Jeff Janes 2012-10-28 19:08:54 Re: Creating indexes in the background