Re: Confusing error message for REINDEX TABLE CONCURRENTLY

2019-06-05 Thread David Rowley
On Wed, 5 Jun 2019 at 18:11, Michael Paquier wrote: > > On Tue, Jun 04, 2019 at 11:26:44AM -0700, Ashwin Agrawal wrote: > > The variable is used in else scope hence I moved it there. But yes its > > removed completely for this scope. > > Thanks for updating the patch. It does its job by having on

Re: Confusing error message for REINDEX TABLE CONCURRENTLY

2019-06-04 Thread Michael Paquier
On Tue, Jun 04, 2019 at 11:26:44AM -0700, Ashwin Agrawal wrote: > The variable is used in else scope hence I moved it there. But yes its > removed completely for this scope. Thanks for updating the patch. It does its job by having one separate message for the concurrent and the non-concurrent cas

Re: Confusing error message for REINDEX TABLE CONCURRENTLY

2019-06-04 Thread Ashwin Agrawal
On Mon, Jun 3, 2019 at 6:27 PM Michael Paquier wrote: > On Mon, Jun 03, 2019 at 04:53:48PM -0700, Ashwin Agrawal wrote: > > Please check if the attached patch addresses and satisfies all the points > > discussed so far in this thread. > > It looks to be so, please see below for some comments. > >

Re: Confusing error message for REINDEX TABLE CONCURRENTLY

2019-06-03 Thread Michael Paquier
On Mon, Jun 03, 2019 at 04:53:48PM -0700, Ashwin Agrawal wrote: > Please check if the attached patch addresses and satisfies all the points > discussed so far in this thread. It looks to be so, please see below for some comments. > +{ > result = ReindexRelationConcurrently(heapOid, o

Re: Confusing error message for REINDEX TABLE CONCURRENTLY

2019-06-03 Thread Ashwin Agrawal
On Tue, May 28, 2019 at 12:05 PM David Rowley wrote: > On Tue, 28 May 2019 at 01:23, Ashwin Agrawal wrote: > > I think we will need to separate out the NOTICE message for concurrent > and regular case. > > > > For example this doesn't sound correct > > WARNING: cannot reindex exclusion constrai

Re: Confusing error message for REINDEX TABLE CONCURRENTLY

2019-05-28 Thread David Rowley
On Tue, 28 May 2019 at 01:23, Ashwin Agrawal wrote: > I think we will need to separate out the NOTICE message for concurrent and > regular case. > > For example this doesn't sound correct > WARNING: cannot reindex exclusion constraint index "public.circles_c_excl" > concurrently, skipping > NOT

Re: Confusing error message for REINDEX TABLE CONCURRENTLY

2019-05-27 Thread Ashwin Agrawal
On Sun, May 26, 2019 at 6:43 PM Michael Paquier wrote: > As you mention for reindex_relation() no indexes <=> nothing to do, > still let's not rely on that. Instead of making the error message > specific to concurrent operations, I would suggest to change it to > "table foo has no indexes to rei

Re: Confusing error message for REINDEX TABLE CONCURRENTLY

2019-05-26 Thread Michael Paquier
On Sat, May 25, 2019 at 02:42:59PM +1200, David Rowley wrote: > Also, I think people probably will care more about the fact that > nothing was done for that table rather than if the table happens to > have no indexes. For the non-concurrently case, that just happened to > be the same thing. This i

Re: Confusing error message for REINDEX TABLE CONCURRENTLY

2019-05-24 Thread David Rowley
On Sat, 25 May 2019 at 12:06, Ashwin Agrawal wrote: > Seems might be just emit the NOTICE "table xxx has no index", if really no > index for concurrent and non-concurrent case, make it consistent, less > confusing and leave it there. Attaching the patch to just do that. Thoughts? Would it not b

Confusing error message for REINDEX TABLE CONCURRENTLY

2019-05-24 Thread Ashwin Agrawal
CREATE TABLE circles (c circle, EXCLUDE USING gist (c WITH &&)); REINDEX TABLE CONCURRENTLY circles; WARNING: cannot reindex exclusion constraint index "public.circles_c_excl" concurrently, skipping NOTICE: table "circles" has no indexes REINDEX The message "table has no indexes" is confusing,