[Pgbigm-hackers] triconsistent function support for pg_bigm

アーカイブの一覧に戻る

Fujii Masao masao****@gmail*****
2015年 8月 5日 (水) 12:29:42 JST


On Wed, Aug 5, 2015 at 2:43 AM, Masahiko Sawada <sawad****@gmail*****> wrote:
> On Tue, Aug 4, 2015 at 1:56 AM, Fujii Masao <masao****@gmail*****> wrote:
>> On Fri, Jul 31, 2015 at 10:13 PM, Fujii Masao <masao****@gmail*****> wrote:
>>> On Fri, Jul 31, 2015 at 2:32 PM, Masahiko Sawada <sawad****@gmail*****> wrote:
>>>> On Thu, Jul 30, 2015 at 12:34 PM, Fujii Masao <masao****@gmail*****> wrote:
>>>>> On Wed, Jul 29, 2015 at 1:56 AM, Sawada Masahiko <sawad****@gmail*****> wrote:
>>>>>> On Tue, Jul 28, 2015 at 11:29 PM, Fujii Masao <masao****@gmail*****> wrote:
>>>>>>> On Fri, Jul 24, 2015 at 11:34 PM, Fujii Masao <masao****@gmail*****> wrote:
>>>>>>>> On Fri, Jul 24, 2015 at 8:36 PM, Sawada Masahiko <sawad****@gmail*****> wrote:
>>>>>>>>> On Fri, Jul 24, 2015 at 12:01 PM, Amit Langote <amitl****@gmail*****> wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Friday, July 24, 2015, Fujii Masao <masao****@gmail*****> wrote:
>>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> http://www.postgresql.org/message-id/E1ZHC****@gemul*****
>>>>>>>>>>>
>>>>>>>>>>> The above commit introduced the triconsistent function into pg_trgm GIN
>>>>>>>>>>> opclass to improve the performance of full text search using that opclass.
>>>>>>>>>>> So what about applying this change into also pg_bigm for better
>>>>>>>>>>> performance?
>>>>>>>>>>> Attached is the WIP patch which adds the triconsistent function into
>>>>>>>>>>> pg_bigm.
>>>>>>>>>>>
>>>>>>>>>>> One big side effect by this patch is that the patched pg_bigm can no
>>>>>>>>>>> longer
>>>>>>>>>>> be compiled with PostgreSQL server 9.3 or before. This is because
>>>>>>>>>>> the triconsistent API in GIN index is supported only in 9.4 or later. I
>>>>>>>>>>> think
>>>>>>>>>>> that we can live with this situation if we keep maintenacing and providing
>>>>>>>>>>> the current stable versoin (i.e., 1.1) for 9.3 or before. Thought?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> +1
>>>>>>>>>>
>>>>>>>>>> From Jeff Janes's pg_trgm 1.2 proposal, it seems clear that triconsistent
>>>>>>>>>> functions may be a win for longer search strings. Perhaps pg_bigm will gain
>>>>>>>>>> immensely from that.
>>>>>>>>>
>>>>>>>>> +1
>>>>>>>>>
>>>>>>>>> I don't confirm performance improvement yet, but the patch looks good to me.
>>>>>>>>
>>>>>>>> Thanks for the review! Pushed.
>>>>>>>>
>>>>>>>> Since the patch bumped the version and droped the support for
>>>>>>>> PostgreSQL 9.3 or before, the document needs to be updated.
>>>>>>>
>>>>>>> Or we can create triConsistent function and add it to pg_bigm opclass
>>>>>>> only when the PostgreSQL version is 9.4 or later, for example, by using
>>>>>>> DO statement. Please see the attached patch.
>>>>>>>
>>>>>>> In this patch, pg_bigm--1.2.sql executes DO statement which retrieves
>>>>>>> the server version, and creates triConsistent function if the version is
>>>>>>> 9.4 or later. This means that we can nicely keep supporting 9.1, 9.2 and
>>>>>>> 9.3 with the latest version of pg_bigm. That's very nice!
>>>>>>
>>>>>> It means that upgrading to pg_bigm-1.2 in 9.3 or before is empty
>>>>>> actually. (just updating version number)
>>>>>> What are the merits of pg_bigm-1.2 supporting them?
>>>>>
>>>>> Good question. I think that the main merit is that we can reduce
>>>>> the number of branches that we have to maintain.
>>>>>
>>>>
>>>> I agree with reducing number of branches.
>>>>
>>>>> So I proposed to make the newer version of pg_bigm work fine with 9.3 or
>>>>> bofore.
>>>>> In this case, we don't need to create and support the branch 1.2 that you suggested. Thought?
>>>>
>>>> You meant that pg_bigm having triConsistent is released as new *minor*
>>>> version of 1.1 instead of version 1.2?
>>>
>>> No. My plan is to
>>>
>>> * Release pg_bigm supporting triConsistent as new "major" version, i.e., 1.2
>>> * Then, release new "major" version, i.e., 1.3, when we apply another "major"
>>>    changes (e.g., introduction of new convenient functions, Windows support)
>>> * Then, release minor versions of 1.1, 1.2 and 1.3 (maybe also 1.0?) when
>>>    we apply "minor" fixes.
>
> Sorry for late response.
>
> I basically agree with this.
> But I have two questions:
> - The both 1.2 and 1.3 will support also 9.3 or before?

1.2, yes.
1.3, it depends on whether the changes that we will apply to 1.3 are
available with 9.3 or before.

> - the 1.3 also has triConsistentFn?

Yes unless there is strong reason why we should drop triConsistent
support in 1.3.

>
>> Attached is the updated version of the patch. I added a few source comments.
>> Barring any objection, I will commit this patch.
>
> The patch looks good to me.
> Compiling is done without warning, and pg_bigm is  successfully
> updated to 1.2****@9***** or before and 9.4 .

Thanks for the test!

Regards,

-- 
Fujii Masao




Pgbigm-hackers メーリングリストの案内
アーカイブの一覧に戻る