pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: Michael Paquier <michael.paquier@gmail.com>
To: Andres Freund <andres@2ndquadrant.com>
Cc: Jim Nasby <jim@nasby.net>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: REINDEX CONCURRENTLY 2.0
Date: Thu, 06 Nov 2014 09:50:58 -0500
Message-ID: <545B8AD2.8030203@gmx.net> (raw)
In-Reply-To: <CAB7nPqSyZhdc-gvwm3KyueoceFJSX5ypQAx_rsJ2DWr5nHtixA@mail.gmail.com>
References: <CAB7nPqSTFkuc7dZxCDX4HOTU63YXHRroNv2aoUzyD-Zz_8Z_Zg@mail.gmail.com>
	<52CF45E8.6090208@nasby.net>
	<CAB7nPqTZfx20Ra2Wf4Gm0a=NqF4q2aC8Q6OS8vKN6fhnD=cUxQ@mail.gmail.com>
	<CAB7nPqRkwKFgn4BFUybqU-Oo-=Gcbq0K-8H93Gr6fX-GGRPDXg@mail.gmail.com>
	<20140827064120.GZ21544@awork2.anarazel.de>
	<CAB7nPqSdSMeQMCvtt9P+ndfao5ALpVPDEMmaBPVjNiifLzb=3Q@mail.gmail.com>
	<CAB7nPqSyZhdc-gvwm3KyueoceFJSX5ypQAx_rsJ2DWr5nHtixA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 10/1/14 3:00 AM, Michael Paquier wrote:
> - Use of AccessExclusiveLock when swapping relfilenodes of an index and
> its concurrent entry instead of ShareUpdateExclusiveLock for safety. At
> the limit of my understanding, that's the consensus reached until now.

I'm very curious about this point.  I looked through all the previous
discussions, and the only time I saw this mentioned was at the very
beginning when it was said that we could review the patch while ignoring
this issue and fix it later with MVCC catalog access.  Then it got very
technical, but it was never explicitly concluded whether it was possible
to fix this or not.

Also, in the thread "Concurrently option for reindexdb" you pointed out
that requiring an exclusive lock isn't really concurrent and proposed an
option like --minimum-locks.

I will point out again that we specifically invented DROP INDEX
CONCURRENTLY because holding an exclusive lock even briefly isn't good
enough.

If REINDEX cannot work without an exclusive lock, we should invent some
other qualifier, like WITH FEWER LOCKS.  It's still useful, but we
shouldn't give people the idea that they can throw away their custom
CREATE INDEX CONCURRENTLY + DROP INDEX CONCURRENTLY scripts.



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (170+ messages)  latest in thread

Message-ID: <545B8AD2.8030203@gmx.net>
Permalink:  ../545B8AD2.8030203@gmx.net/
Also on:    postgresql.org/message-id/545B8AD2.8030203@gmx.net

 · 

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_e@gmx.net, michael.paquier@gmail.com, andres@2ndquadrant.com, jim@nasby.net
  Subject: Re: REINDEX CONCURRENTLY 2.0
  In-Reply-To: <545B8AD2.8030203@gmx.net>

* 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