Re: multiple indexes on the same column

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tiffany Thang <tiffanythang(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: multiple indexes on the same column
Date: 2019-04-12 17:07:36
Message-ID: 2157.1555088856@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Andres Freund <andres(at)anarazel(dot)de> writes:
> On 2019-04-12 09:51:51 -0400, Tom Lane wrote:
>> Tiffany Thang <tiffanythang(at)gmail(dot)com> writes:
>>> Can someone explain the use of creating multiple indexes on the same
>>> column?

>> There is none, unless the indexes have different properties (e.g.
>> different opclasses and/or index AMs).

> Well, it can be beneficial to create a new index concurrently, and then
> drop the old one concurrently.

Right, but in that situation there's no intent to keep both indexes
in place. You're just putting up with extra overhead temporarily
as a means to avoid taking an exclusive lock.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Paul van der Linden 2019-04-12 20:11:11 Safe to delete files?
Previous Message Andres Freund 2019-04-12 16:55:15 Re: multiple indexes on the same column