Re: [GENERAL] questions about 2nd index on one column - Mailing list pgsql-general

From Adrian Klaver
Subject Re: [GENERAL] questions about 2nd index on one column
Date
Msg-id 410b8680-bf7d-6015-4bd3-57fbf18685e1@aklaver.com
Whole thread Raw
In response to [GENERAL] questions about 2nd index on one column  (Ravi Kapoor <ravikapoor101@gmail.com>)
List pgsql-general
On 01/03/2017 11:07 AM, Ravi Kapoor wrote:
>
> I have a bit strange question. I am trying to figure out how to avoid
> table locking while creating an index through Django (1.5.1) in Postgres
> 9.4.7

First Django 1.5.x has been past end of life for 2.25 years.
Second before it went EOL it was up to 1.5.12.

>
> Django 1.5.1 does not support concurrent indexing. So my thought is to
> first create a concurrent index using SQL prompt.
> Then try to update django model to add index, which will effectively
> create 2 indexes on same column.

Is the index going to be on a single column?

How are you going to update the model?

>
> So my questions are:
>
> If I create a 2nd index on one column,
> 1. Does postgres scan entire table to create index from scratch or does
> it simply copy the first index?
> 2. Does postgres lock the table to create this index?
>
> thanks
>


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Ravi Kapoor
Date:
Subject: [GENERAL] questions about 2nd index on one column
Next
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] questions about 2nd index on one column