Re: [HACKERS] REINDEX CONCURRENTLY 2.0

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Andreas Karlsson <andreas(at)proxel(dot)se>
Cc: Sergei Kornilov <sk(at)zsrv(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Stephen Frost <sfrost(at)snowman(dot)net>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: [HACKERS] REINDEX CONCURRENTLY 2.0
Date: 2019-01-19 07:54:59
Message-ID: 20190119075459.GF3306@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 17, 2019 at 02:11:01PM +0900, Michael Paquier wrote:
> Okay, I have begun digging into the patch, and extracted for now two
> things which can be refactored first, giving a total of three patches:
> - 0001, which creates WaitForOlderSnapshots to snapmgr.c. I think
> that this can be useful for external extensions to have a process wait
> for snapshots older than a minimum threshold hold by other
> transactions.
> - 0002, which moves the concurrent index build into its own routine,
> index_build_concurrent(). At the same time, index_build() has a
> isprimary argument which is not used, so let's remove it. This
> simplifies a bit the refactoring as well.
> - 0003 is the core patch, realigned with the rest, fixing some typos I
> found on the way.

Are there any objections if I commit 0001? Introducing
WaitForOlderSnapshots() is quite independent from the rest, and the
refactoring is obvious. For 0002, I am still not 100% sure if
index_build_concurrent() is the best interface but I am planning to
look more at this stuff next week, particularly the drop portion which
needs more work.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2019-01-19 10:47:53 Re: Alternative to \copy in psql modelled after \g
Previous Message Edmund Horner 2019-01-19 04:04:13 Re: Tid scan improvements