Re: Proposal : REINDEX SCHEMA

From: Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal : REINDEX SCHEMA
Date: 2014-12-01 14:29:09
Message-ID: CAD21AoDzxo3paAr8=PCQDx=eBS7Aqc3AVv8FbKjTf-J_67fYUQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 27, 2014 at 11:43 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> On Thu, Nov 27, 2014 at 8:18 PM, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com> wrote:
>> On Thu, Nov 27, 2014 at 1:07 PM, Michael Paquier
>> <michael(dot)paquier(at)gmail(dot)com> wrote:
>>> On Thu, Nov 27, 2014 at 12:55 AM, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com> wrote:
>>>> +1 to define new something object type and remove do_user and do_system.
>>>> But if we add OBJECT_SYSTEM to ObjectType data type,
>>>> system catalogs are OBJECT_SYSTEM as well as OBJECT_TABLE.
>>>> It's a bit redundant?
>>> Yes, kind of. That's a superset of a type of relations, aka a set of
>>> catalog tables. If you find something cleaner to propose, feel free.
>>
>> I thought we can add new struct like ReindexObjectType which has
>> REINDEX_OBJECT_TABLE,
>> REINDEX_OBJECT_SYSTEM and so on. It's similar to GRANT syntax.
> Check.
>
>>>>> Another thing, ReindexDatabaseOrSchema should be renamed to ReindexObject.
>>>>> So, I think that we need to think a bit more here. We are not far from
>>>>> smth that could be committed, so marking as "Waiting on Author" for
>>>>> now. Thoughts?
>>>>
>>>> Is the table also kind of "object"?
>>> Sorry, I am not sure I follow you here. Indexes and tables have
>>> already their relkind set in ReindexStmt, and I think that we're fine
>>> to continue letting them go in their own reindex code path for now.
>>
>> It was not enough, sorry.
>> I mean that there is already ReindexTable() function.
>> if we renamed ReindexObject, I would feel uncomfortable feeling.
>> Because table is also kind of "object".
> Check.
>
> If you get that done, I'll have an extra look at it and then let's
> have a committer look at it.

Attached patch is latest version.
I added new enum values like REINDEX_OBJECT_XXX,
and changed ReindexObject() function.
Also ACL problem is fixed for this version.

Regards,

-------
Sawada Masahiko

Attachment Content-Type Size
000_reindex_schema_v6.patch application/octet-stream 12.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2014-12-01 14:38:11 Re: [PROTOCOL TODO] Permit streaming of unknown-length lob/clob (bytea,text,etc)
Previous Message Marco Nenciarini 2014-12-01 13:51:29 Re: [Windows,PATCH] Use faster, higher precision timer API