Re: Bug in reindexdb's error reporting

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Bug in reindexdb's error reporting
Date: 2019-05-11 08:28:43
Message-ID: CAOBaU_aMhbWQaDetZz2NkW3+PvFEg0NGRau3_f7X1LS9AAytwA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, May 11, 2019 at 6:04 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Fri, May 10, 2019 at 09:25:58PM -0400, Tom Lane wrote:
> > Michael Paquier <michael(at)paquier(dot)xyz> writes:
> > > The refactoring bits are fine for HEAD. For back-branches I would
> > > suggest using the simplest patch of upthread.
> >
> > Makes sense to me too. The refactoring is mostly to make future
> > additions easier, so there's not much point for back branches.
>
> For now, I have committed and back-patched all the way down the bug
> fix.

Thanks!

> The refactoring is also kind of nice so I'll be happy to look at
> an updated patch. At the same time, let's get rid of
> reindex_system_catalogs() and integrate it with reindex_one_database()
> with a REINDEX_SYSTEM option in the enum. Julien, could you send a
> new version?

Yes, I had further refactoring in mind including this one (there are
also quite some parameters passed to the functions, passing a struct
instead could be worthwhile), but I thought this should be better done
after branching.

> > Right. Also, I was imagining folding the steps together while
> > building the commands so that there's just one switch() for that,
> > along the lines of
>
> Yes, that makes sense.

Indeed.

I attach the switch refactoring that applies on top of current HEAD,
and the reindex_system_catalogs() removal in a different patch in case
that's too much during feature freeze.

Attachment Content-Type Size
0002-merge_reindex_system_catalogs-v1.diff text/x-patch 3.2 KB
0001-use_enum-v1.diff text/x-patch 5.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2019-05-11 09:49:49 Re: POC: Cleaning up orphaned files using undo logs
Previous Message Michael Paquier 2019-05-11 04:04:50 Re: Bug in reindexdb's error reporting