Re: Refactor ReindexStmt and its "concurrent" boolean

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Refactor ReindexStmt and its "concurrent" boolean
Date: 2020-09-02 11:17:32
Message-ID: CAOBaU_Z__25nDzxx20kg0BEOP2XLKKQdNy3CtRw3euUKnz_q4g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 2, 2020 at 1:03 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> Hi all,
>
> $subject has been mentioned a couple of times, including today:
> https://www.postgresql.org/message-id/20200902010012.GE1489@paquier.xyz
>
> We have a boolean argument in ReindexStmt to control a concurrent
> run, and we also have in parallel of that a bitmask to control the
> options of the statement, which feels like a duplicate. Attached is a
> patch to refactor the whole, adding CONCURRENTLY as a member of the
> available options. This simplifies a bit the code.
>
> Any thoughts?

+1

struct ReindexIndexCallbackState
{
- bool concurrent; /* flag from statement */
+ bool options; /* flag from statement */
Oid locked_table_oid; /* tracks previously locked table */
};

Shouldn't options be an int? The rest of the patch looks good to me.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey M. Borodin 2020-09-02 12:18:09 Re: [PATCH] Covering SPGiST index
Previous Message Michael Paquier 2020-09-02 11:03:26 Refactor ReindexStmt and its "concurrent" boolean