Re: cleanup & refactoring on reindexdb.c

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: cleanup & refactoring on reindexdb.c
Date: 2019-06-28 07:25:00
Message-ID: CAOBaU_YWbOz8Z+d7GCrpAYqH6rMzgrQpJUwqUUgpRYewn9a+4Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 13, 2019 at 5:09 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Sun, May 12, 2019 at 11:16:28AM +0200, Julien Rouhaud wrote:
> > I attach two patches to fix both (it could be squashed in a single
> > commit as both are straightforward), for upcoming v13.
>
> Squashing both patches together makes the most sense in my opinion as
> the same areas are reworked. I can notice that you have applied
> pgindent, but the indentation got a bit messed up because the new enum
> ReindexType is missing from typedefs.list.
>
> I have reworked a bit your patch as per the attached, tweaking a
> couple of places like reordering the elements in ReindexType,
> reviewing the indentation, etc. At the end I can see more reasons to
> use multiple switch/case points as if we add more options in the
> future then we have more code paths to take care of. These would
> unlikely get forgotten, but there is no point to take this risk
> either, and that would simplify future patches. It is also possible
> to group some types together when assigning the object name similarly
> to what's on HEAD.

Thanks! I'm fine with the changes.

The patch does not apply anymore, so here's a rebased version.

Attachment Content-Type Size
reindex-refactor-v3.patch application/octet-stream 8.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2019-06-28 07:57:06 Re: Commitfest 2019-07, the first of five* for PostgreSQL 13
Previous Message Peter Eisentraut 2019-06-28 06:53:31 Re: catalog files simplification