pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Sergei Kornilov <sk@zsrv.org>
To: Michael Paquier <michael.paquier@gmail.com>
To: Andreas Karlsson <andreas@proxel.se>
To: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Craig Ringer <craig@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Subject: Re: [HACKERS] REINDEX CONCURRENTLY 2.0
Date: Thu, 27 Dec 2018 11:04:09 +0100
Message-ID: <d26799a0-14ba-7c2c-ca86-c13203a5901f@2ndquadrant.com> (raw)
In-Reply-To: <20486991544381729@iva5-d3020dc3459d.qloud-c.yandex.net>
References: <CAB7nPqRty06RXyphfcmWgVoiHVjjB2WCDj4UcU_nRQvo-Cx52w@mail.gmail.com>
	<20171221024626.ycidqbnwcz25ekry@alvherre.pgsql>
	<CAB7nPqSS7xVKGkQbroiJ_wFgxa9n3COnemGzeXv36-A3XLbAeg@mail.gmail.com>
	<CAMsr+YGhS541Zx7kmda5SXLS3NLeY71HksZrbRsRbbS3VaXfkQ@mail.gmail.com>
	<20180126022813.GD2416@tamriel.snowman.net>
	<9523ad05-525c-598e-ad2d-061b5a94062c@proxel.se>
	<20180201062158.GD6398@paquier.xyz>
	<60052986-956b-4478-45ed-8bd119e9b9cf@2ndquadrant.com>
	<10797471544200851@myt3-964eae3a5b05.qloud-c.yandex.net>
	<93a3d2fb-43a0-cf14-e8d0-d2c3195c1e5b@2ndquadrant.com>
	<20486991544381729@iva5-d3020dc3459d.qloud-c.yandex.net>

On 09/12/2018 19:55, Sergei Kornilov wrote:
>>       <para>
>>       An index build with the <literal>CONCURRENTLY</literal> option failed, leaving
>>       an <quote>invalid</quote> index. Such indexes are useless but it can be
>> -      convenient to use <command>REINDEX</command> to rebuild them. Note that
>> -      <command>REINDEX</command> will not perform a concurrent build. To build the
>> -      index without interfering with production you should drop the index and
>> -      reissue the <command>CREATE INDEX CONCURRENTLY</command> command.
>> +      convenient to use <command>REINDEX</command> to rebuild them.
>>      </para>
> This documentation change seems wrong for me: reindex concurrently does not rebuild invalid indexes. To fix invalid indexes we still need reindex with lock table or recreate this index concurrently.
> 

The current patch prevents REINDEX CONCURRENTLY of invalid indexes, but
I wonder why that is so.  Anyone remember?

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (170+ messages)  latest in thread

Message-ID: <d26799a0-14ba-7c2c-ca86-c13203a5901f@2ndquadrant.com>
Permalink:  ../d26799a0-14ba-7c2c-ca86-c13203a5901f@2ndquadrant.com/
Also on:    postgresql.org/message-id/d26799a0-14ba-7c2c-ca86-c13203a5901f@2ndquadrant.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, sk@zsrv.org, michael.paquier@gmail.com, andreas@proxel.se, sfrost@snowman.net, craig@2ndquadrant.com, alvherre@alvh.no-ip.org
  Subject: Re: [HACKERS] REINDEX CONCURRENTLY 2.0
  In-Reply-To: <d26799a0-14ba-7c2c-ca86-c13203a5901f@2ndquadrant.com>

* 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