[Pgbigm-hackers] Upgrade to version 1.1 - Coexist with pg_trgm

アーカイブの一覧に戻る

Beena Emerson memis****@gmail*****
2013年 7月 23日 (火) 23:45:16 JST


On Mon, Jul 22, 2013 at 10:44 PM, Fujii Masao <masao****@gmail*****> wrote:

> On Tue, Jul 23, 2013 at 12:20 AM, Amit Langote <amitl****@gmail*****>
> wrote:
> > On Mon, Jul 22, 2013 at 10:57 PM, Beena Emerson <memis****@gmail*****>
> wrote:
> >> Hello,
> >>
> >> Modules pg_trgm and pg_bigm cannot be installed in the same database
> because
> >> both declare the operator "gin_trgm_ops".
> >>
> >> Module pg_bigm defines two operator classes:
> >> 1. gin_bigm_ops
> >> 2. gin_trgm_ops
> >>
> >> The definition of both the operators is exactly same and the second
> >> "gin_trgm_ops" is defined for backward compatibility (stated in
> comments).
> >> There is no apparent need to declare gin_trgm_ops. By deleting this
> >> operator, we can install pg_bigm and pg_trgm in the same database.
> >>
> >> The attached patch deletes the pg_trgm_ops and also, makes necessary
> changes
> >> to upgrade to version 1.1.
> >>
> >
> > Thanks for this update. In fact, having these two co-exist might help
> > in scenarios where it would be desirable to have both a pg_trgm index
> > and a pg_bigm index on the same set of columns of a relation. In such
> > a case, I have observed in past experiments that the planner chooses
> > bigm index for searches involving 1-2 character strings. and trgm
> > index for >=3 character string searches. That is desirable for
> > performance reasons.
> >
> > What do others think?
>
> I agree that this is good improvement.
>
> Beena,
> Don't we need pg_bigm--1.0--1.1.sql?
>

I am sorry I missed this.
pg_bigm--1.0--1.1.sql file would be required to upgrade from 1.0 to 1.1.

I have attached an v2 patch.
It just drops the OPERATOR CLASS gin_trgm_ops in pg_bigm--1.0--1.1.sql.

Kindly note that if an existing index uses "gin_trgm_ops" then it will not
possible to upgrade from 1.0 to 1.1. If this is to be allowed then the DROP
... CASCADE can be used in pg_bigm--1.0--1.1.sql. However, I feel this
approach will not be appropriate as it would delete all indexes using the
operator gin_trgm_op.

A note regarding this is probably needed to be added to the documentation.

--

Beena Emerson
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
ダウンロード 
-------------- next part --------------
$B%F%-%9%H7A<00J30$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
$B%U%!%$%kL>(B: version_upgrade_v2.patch
$B7?(B:         application/octet-stream
$B%5%$%:(B:     6346 $B%P%$%H(B
$B @ bL@(B:       $BL5$7(B
URL:        http://lists.sourceforge.jp/mailman/archives/pgbigm-hackers/attachments/20130723/e5f7306f/attachment.obj 



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