pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid spurious wait in concurrent reindex
Date: Fri, 15 Jan 2021 13:34:39 +0000
Message-ID: <E1l0PFP-0007R3-Oj@gemulon.postgresql.org> (raw)

Avoid spurious wait in concurrent reindex

This is like commit c98763bf51bf, but for REINDEX CONCURRENTLY.  To wit:
this flags indicates that the current process is safe to ignore for the
purposes of waiting for other snapshots, when doing CREATE INDEX
CONCURRENTLY and REINDEX CONCURRENTLY.  This helps two processes doing
either of those things not deadlock, and also avoids spurious waits.

Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
Reviewed-by: Dmitry Dolgov <9erthalion6@gmail.com>
Reviewed-by: Hamid Akhtar <hamid.akhtar@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/20201130195439.GA24598@alvherre.pgsql

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f9900df5f94936067e6fa24a9df609863eb08da2

Modified Files
--------------
src/backend/commands/indexcmds.c | 48 +++++++++++++++++++++++++++++++++++++++-
src/include/storage/proc.h       |  1 +
2 files changed, 48 insertions(+), 1 deletion(-)



Message-ID: <E1l0PFP-0007R3-Oj@gemulon.postgresql.org>
Permalink:  ../E1l0PFP-0007R3-Oj@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1l0PFP-0007R3-Oj@gemulon.postgresql.org

 · 

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 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-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Avoid spurious wait in concurrent reindex
  In-Reply-To: <E1l0PFP-0007R3-Oj@gemulon.postgresql.org>
  References: <E1l0PFP-0007R3-Oj@gemulon.postgresql.org>

* 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