From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Tiffany Thang <tiffanythang@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: multiple indexes on the same column
Date: Fri, 12 Apr 2019 13:07:36 -0400
Message-ID: <2157.1555088856@sss.pgh.pa.us> (raw)
In-Reply-To: <20190412165515.xmuni4ucagtehiqj@alap3.anarazel.de>
References: <CAB_W-NNpcyQEpMba42401yupk_7t4vY2cgA2gEty7oGTzUxd_w@mail.gmail.com>
<16482.1555077111@sss.pgh.pa.us>
<20190412165515.xmuni4ucagtehiqj@alap3.anarazel.de>
Andres Freund <andres@anarazel.de> writes:
> On 2019-04-12 09:51:51 -0400, Tom Lane wrote:
>> Tiffany Thang <tiffanythang@gmail.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, tiffanythang@gmail.com
Subject: Re: multiple indexes on the same column
In-Reply-To: <2157.1555088856@sss.pgh.pa.us>
References: <CAB_W-NNpcyQEpMba42401yupk_7t4vY2cgA2gEty7oGTzUxd_w@mail.gmail.com> <16482.1555077111@sss.pgh.pa.us> <20190412165515.xmuni4ucagtehiqj@alap3.anarazel.de> <2157.1555088856@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox