Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hGV7L-0005hV-J7 for pgsql-general@arkaria.postgresql.org; Tue, 16 Apr 2019 20:55:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hGV7I-0000gv-QJ for pgsql-general@arkaria.postgresql.org; Tue, 16 Apr 2019 20:55:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hGV7H-0000Yg-EB for pgsql-general@lists.postgresql.org; Tue, 16 Apr 2019 20:55:44 +0000 Received: from mail-oln040092009043.outbound.protection.outlook.com ([40.92.9.43] helo=NAM04-BN3-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hGV78-0006ME-Ra for pgsql-general@lists.postgresql.org; Tue, 16 Apr 2019 20:55:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dqFnHZSzqiGuqWsU0Hauz1mHUzQ3/d325RdVz7A0T3w=; b=aXu1aE8YwAKrxFHraBSuD31IePScXq3ICf1iHyTYC0V/jt5OYRe6PSXFHcbdncS63D4PdBKZGJEWC0R0mA42Zb532EYEC1bmhlarDBZ8Rup/tuxYsdYGKoappJF4scjWLJaqwOHBsixxUqDkfqQxd9nO+rqzOKLOsiq1xx5Yj4z34wc0FhKN9H/HGrs2+dCkI0PxEYtWWqyCDFjOQ00kgq5PmDMqueTwGui7O0vByjSeIIHvMucuOtWnDWqHnNgLGB/DrHEu0ZL6XvXfn82f7XONIdYWsLY6BLUsfrv6uMmCFCWhaEOQwMb/28Hv7ux3NIMJpDaY7TCQbR3hIzwKiQ== Received: from BN3NAM04FT010.eop-NAM04.prod.protection.outlook.com (10.152.92.57) by BN3NAM04HT003.eop-NAM04.prod.protection.outlook.com (10.152.92.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1771.16; Tue, 16 Apr 2019 20:55:32 +0000 Received: from BYAPR08MB5014.namprd08.prod.outlook.com (10.152.92.52) by BN3NAM04FT010.mail.protection.outlook.com (10.152.92.117) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1771.16 via Frontend Transport; Tue, 16 Apr 2019 20:55:32 +0000 Received: from BYAPR08MB5014.namprd08.prod.outlook.com ([fe80::cc89:48a0:6799:525f]) by BYAPR08MB5014.namprd08.prod.outlook.com ([fe80::cc89:48a0:6799:525f%5]) with mapi id 15.20.1792.018; Tue, 16 Apr 2019 20:55:32 +0000 From: Julie Nishimura To: Adrian Klaver , "pgsql-general@lists.postgresql.org" Subject: Re: text search configuration missing while migration from 8.3 to 9.4 Thread-Topic: text search configuration missing while migration from 8.3 to 9.4 Thread-Index: AQHU9HmnVUlZprl7wkSUmNpq47N3S6Y/JQ5egAAQhYCAAAe8tA== Date: Tue, 16 Apr 2019 20:55:32 +0000 Message-ID: References: ,<560677b5-53d7-145b-79ee-2c25b490842b@aklaver.com> In-Reply-To: <560677b5-53d7-145b-79ee-2c25b490842b@aklaver.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:0C82344954FD0AC381B6532F686B856841384906C13F2B05AA7C8AB6AA20894C;UpperCasedChecksum:521D68C0586E792E4188F98443BFA3CE4FE39383784DA1B3B8EB16C674357C22;SizeAsReceived:7012;Count:43 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [JFPMqQjM15vBZa+YCp60uqSXMzkNxI75] x-ms-publictraffictype: Email x-incomingheadercount: 43 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(20181119110)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031323274)(2017031324274)(2017031322404)(1601125500)(1603101475)(1701031045);SRVR:BN3NAM04HT003; x-ms-traffictypediagnostic: BN3NAM04HT003: x-microsoft-antispam-message-info: WJYNH7wN7MZYByP9RRXLaNYGrGAIjJq9QQDnxsUv2gR6EStAxu6jo0cGiIu+FWq+lYgBA7xNfBm2lzn0Gi04tDNJa3OuK5o14YAfk7FcMDKCKKfVAPlH2RyuAnsyYfsMydhOEFBpfbdwZgVaoNT0wCt3eWr1t5+ABP+GdWEbyP66Q7hW5UiSYf80plg6Rfef Content-Type: multipart/alternative; boundary="_000_BYAPR08MB50140786DCCBC9FDE7DD0137AC240BYAPR08MB5014namp_" MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: b5d03990-2703-4fcb-e38e-08d6c2adddd4 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Apr 2019 20:55:32.5790 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3NAM04HT003 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_BYAPR08MB50140786DCCBC9FDE7DD0137AC240BYAPR08MB5014namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Oh thank you for answering me!!! 1) This is the 8.3 source: select * from pg_ts_dict; dictname | dictnamespace | dictowner | dicttemplate | = dictinitoption ---------------------+---------------+-----------+--------------+----------= ----------------------------------------- simple | 11 | 10 | 3727 | danish_stem | 11 | 10 | 11282 | language = =3D 'danish', stopwords =3D 'danish' dutch_stem | 11 | 10 | 11282 | language = =3D 'dutch', stopwords =3D 'dutch' english_stem | 11 | 10 | 11282 | language = =3D 'english', stopwords =3D 'english' finnish_stem | 11 | 10 | 11282 | language = =3D 'finnish', stopwords =3D 'finnish' french_stem | 11 | 10 | 11282 | language = =3D 'french', stopwords =3D 'french' german_stem | 11 | 10 | 11282 | language = =3D 'german', stopwords =3D 'german' hungarian_stem | 11 | 10 | 11282 | language = =3D 'hungarian', stopwords =3D 'hungarian' italian_stem | 11 | 10 | 11282 | language = =3D 'italian', stopwords =3D 'italian' norwegian_stem | 11 | 10 | 11282 | language = =3D 'norwegian', stopwords =3D 'norwegian' portuguese_stem | 11 | 10 | 11282 | language = =3D 'portuguese', stopwords =3D 'portuguese' romanian_stem | 11 | 10 | 11282 | language = =3D 'romanian' russian_stem | 11 | 10 | 11282 | language = =3D 'russian', stopwords =3D 'russian' spanish_stem | 11 | 10 | 11282 | language = =3D 'spanish', stopwords =3D 'spanish' swedish_stem | 11 | 10 | 11282 | language = =3D 'swedish', stopwords =3D 'swedish' turkish_stem | 11 | 10 | 11282 | language = =3D 'turkish', stopwords =3D 'turkish' english_stem_nostop | 21960 | 10 | 11282 | language = =3D 'english' hwsplit | 21960 | 10 | 22342 | hwsplit_only | 21960 | 10 | 22342 | returnrep= laced =3D 'false', keeporig =3D 'false' (19 rows) This is the target 9.4: select * from pg_ts_dict; dictname | dictnamespace | dictowner | dicttemplate | = dictinitoption -----------------+---------------+-----------+--------------+--------------= ------------------------------------- simple | 11 | 10 | 3727 | danish_stem | 11 | 10 | 11592 | language =3D = 'danish', stopwords =3D 'danish' dutch_stem | 11 | 10 | 11592 | language =3D = 'dutch', stopwords =3D 'dutch' english_stem | 11 | 10 | 11592 | language =3D = 'english', stopwords =3D 'english' finnish_stem | 11 | 10 | 11592 | language =3D = 'finnish', stopwords =3D 'finnish' french_stem | 11 | 10 | 11592 | language =3D = 'french', stopwords =3D 'french' german_stem | 11 | 10 | 11592 | language =3D = 'german', stopwords =3D 'german' hungarian_stem | 11 | 10 | 11592 | language =3D = 'hungarian', stopwords =3D 'hungarian' italian_stem | 11 | 10 | 11592 | language =3D = 'italian', stopwords =3D 'italian' norwegian_stem | 11 | 10 | 11592 | language =3D = 'norwegian', stopwords =3D 'norwegian' portuguese_stem | 11 | 10 | 11592 | language =3D = 'portuguese', stopwords =3D 'portuguese' romanian_stem | 11 | 10 | 11592 | language =3D = 'romanian' russian_stem | 11 | 10 | 11592 | language =3D = 'russian', stopwords =3D 'russian' spanish_stem | 11 | 10 | 11592 | language =3D = 'spanish', stopwords =3D 'spanish' swedish_stem | 11 | 10 | 11592 | language =3D = 'swedish', stopwords =3D 'swedish' turkish_stem | 11 | 10 | 11592 | language =3D = 'turkish', stopwords =3D 'turkish' (16 rows) As you see, last 3 records for dictnamespace 21960 are missing. Another thing: source (8.3): \dF List of text search configurations Schema | Name | Description ------------+------------+------------------------------------------------ pg_catalog | danish | configuration for danish language pg_catalog | dutch | configuration for dutch language pg_catalog | english | configuration for english language pg_catalog | finnish | configuration for finnish language pg_catalog | french | configuration for french language pg_catalog | german | configuration for german language pg_catalog | hungarian | configuration for hungarian language pg_catalog | italian | configuration for italian language pg_catalog | norwegian | configuration for norwegian language pg_catalog | portuguese | configuration for portuguese language pg_catalog | romanian | configuration for romanian language pg_catalog | russian | configuration for russian language pg_catalog | simple | simple configuration pg_catalog | spanish | configuration for spanish language pg_catalog | swedish | configuration for swedish language pg_catalog | turkish | configuration for turkish language public | hw_english | Hitwise configuration for the English language (17 rows) target (9.4): \dF List of text search configurations Schema | Name | Description ------------+------------+--------------------------------------- pg_catalog | danish | configuration for danish language pg_catalog | dutch | configuration for dutch language pg_catalog | english | configuration for english language pg_catalog | finnish | configuration for finnish language pg_catalog | french | configuration for french language pg_catalog | german | configuration for german language pg_catalog | hungarian | configuration for hungarian language pg_catalog | italian | configuration for italian language pg_catalog | norwegian | configuration for norwegian language pg_catalog | portuguese | configuration for portuguese language pg_catalog | romanian | configuration for romanian language pg_catalog | russian | configuration for russian language pg_catalog | simple | simple configuration pg_catalog | spanish | configuration for spanish language pg_catalog | swedish | configuration for swedish language pg_catalog | turkish | configuration for turkish language (16 rows) So, the last record "hw_english" does not show in the target. This is the parameter in postgresql file, same on both locations. # default configuration for text search default_text_search_config =3D 'pg_catalog.english' Unfortunately, I am not sure about tsearch2, it is new system that I inheri= ted not too long ago. So, the production is still on 8.3, but dev/staging t= hat was built recently, is on 9.4. The engineer who installed it said he us= ed it from Puppet module for postgresql... He is not sure about tsearch2 mo= dule either. Do you know how can I find it? Or how can I install it? It see= ms like some gin indices are missing. I need to find out what is missing... THANK YOU for your help ________________________________ From: Adrian Klaver Sent: Tuesday, April 16, 2019 1:02 PM To: Julie Nishimura; pgsql-general@lists.postgresql.org Subject: Re: text search configuration missing while migration from 8.3 to = 9.4 On 4/16/19 12:02 PM, Julie Nishimura wrote: > Correction: tables are not missing, but some records from the tables > missing. How can we migrate them properly from 8.3 to 9.4? This is going to need some more info: 1) What records? 2) 8.3 was the version where text search was integrated into core. Where you using tsearch2 before you moved to 8.3? 3) If the answer to 2) is yes, did you have the contrib/tsearch2 module installed in 8.3 for backwards compatibility? 4) How was the 9.4 version installed? 4) If the answer to 3) is yes did you install the contrib/tsearch2 in the 9.4 cluster? > > Sent from my iPhone > > On Apr 16, 2019, at 10:32 AM, Julie Nishimura > wrote: > >> Hello, we recenlty created fresh install of 9.4, created new dbs, and >> pg_dumped and restored correspondent dbs from 8.3 (pg_dump|psql, being >> on target). Now we've noticed that some of `pg_catalog.pg_ts_config` >> and pg_ts_dict tables are missing, making text search on 9.4 very >> slow. We tried to insert missing records from pg_catalog.pg_ts_config, >> but it does not help. What is the proper procedure for it? Please >> help, thanks! -- Adrian Klaver adrian.klaver@aklaver.com --_000_BYAPR08MB50140786DCCBC9FDE7DD0137AC240BYAPR08MB5014namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Oh thank you for answering me!!!

1) This is the 8.3 source:
select * from pg_ts_dict;
      dictname       | dictnamespace | d= ictowner | dicttemplate |               =    dictinitoption              = ;    
---------------------+---------------+-----------+--------= ------+---------------------------------------------------
 simple              |   =          11 |        10 | &nbs= p;       3727 |
 danish_stem         |       &= nbsp;    11 |        10 |      = ;  11282 | language =3D 'danish', stopwords =3D 'danish'
 dutch_stem          |     &nb= sp;      11 |        10 |     =    11282 | language =3D 'dutch', stopwords =3D 'dutch'
 english_stem        |       &= nbsp;    11 |        10 |      = ;  11282 | language =3D 'english', stopwords =3D 'english'
 finnish_stem        |       &= nbsp;    11 |        10 |      = ;  11282 | language =3D 'finnish', stopwords =3D 'finnish'
 french_stem         |       &= nbsp;    11 |        10 |      = ;  11282 | language =3D 'french', stopwords =3D 'french'
 german_stem         |       &= nbsp;    11 |        10 |      = ;  11282 | language =3D 'german', stopwords =3D 'german'
 hungarian_stem      |        =    11 |        10 |       &nb= sp;11282 | language =3D 'hungarian', stopwords =3D 'hungarian'
 italian_stem        |       &= nbsp;    11 |        10 |      = ;  11282 | language =3D 'italian', stopwords =3D 'italian'
 norwegian_stem      |        =    11 |        10 |       &nb= sp;11282 | language =3D 'norwegian', stopwords =3D 'norwegian'
 portuguese_stem     |         &nbs= p;  11 |        10 |        11= 282 | language =3D 'portuguese', stopwords =3D 'portuguese'
 romanian_stem       |        =    11 |        10 |       &nb= sp;11282 | language =3D 'romanian'
 russian_stem        |       &= nbsp;    11 |        10 |      = ;  11282 | language =3D 'russian', stopwords =3D 'russian'
 spanish_stem        |       &= nbsp;    11 |        10 |      = ;  11282 | language =3D 'spanish', stopwords =3D 'spanish'
 swedish_stem        |       &= nbsp;    11 |        10 |      = ;  11282 | language =3D 'swedish', stopwords =3D 'swedish'
 turkish_stem        |       &= nbsp;    11 |        10 |      = ;  11282 | language =3D 'turkish', stopwords =3D 'turkish'
 english_stem_nostop |         21960 |  =      10 |        11282 | language =3D '= english'
 hwsplit             |    = ;     21960 |        10 |      = ;  22342 |
 hwsplit_only        |       =   21960 |        10 |        2= 2342 | returnreplaced =3D 'false', keeporig =3D 'false'
(19 rows)

This is the target 9.4:
select * from pg_ts_dict;
    dictname     | dictnamespace | dictowner | dic= ttemplate |                  d= ictinitoption                  = ;
-----------------+---------------+-----------+------------= --+---------------------------------------------------
 simple          |       =      11 |        10 |     &nbs= p;   3727 |
 danish_stem     |           &= nbsp;11 |        10 |        11592 = | language =3D 'danish', stopwords =3D 'danish'
 dutch_stem      |         &nb= sp;  11 |        10 |        1= 1592 | language =3D 'dutch', stopwords =3D 'dutch'
 english_stem    |           &= nbsp;11 |        10 |        11592 = | language =3D 'english', stopwords =3D 'english'
 finnish_stem    |           &= nbsp;11 |        10 |        11592 = | language =3D 'finnish', stopwords =3D 'finnish'
 french_stem     |           &= nbsp;11 |        10 |        11592 = | language =3D 'french', stopwords =3D 'french'
 german_stem     |           &= nbsp;11 |        10 |        11592 = | language =3D 'german', stopwords =3D 'german'
 hungarian_stem  |            = 11 |        10 |        11592 | lan= guage =3D 'hungarian', stopwords =3D 'hungarian'
 italian_stem    |           &= nbsp;11 |        10 |        11592 = | language =3D 'italian', stopwords =3D 'italian'
 norwegian_stem  |            = 11 |        10 |        11592 | lan= guage =3D 'norwegian', stopwords =3D 'norwegian'
 portuguese_stem |            11 | =        10 |        11592 | language= =3D 'portuguese', stopwords =3D 'portuguese'
 romanian_stem   |            = 11 |        10 |        11592 | lan= guage =3D 'romanian'
 russian_stem    |           &= nbsp;11 |        10 |        11592 = | language =3D 'russian', stopwords =3D 'russian'
 spanish_stem    |           &= nbsp;11 |        10 |        11592 = | language =3D 'spanish', stopwords =3D 'spanish'
 swedish_stem    |           &= nbsp;11 |        10 |        11592 = | language =3D 'swedish', stopwords =3D 'swedish'
 turkish_stem    |           &= nbsp;11 |        10 |        11592 = | language =3D 'turkish', stopwords =3D 'turkish'
(16 rows)


As you see, last 3 records for dictnamespace 21960 are missing.

Another thing:
source (8.3):

\dF
                    = List of text search configurations
   Schema   |    Name    |   &= nbsp;              Description   &n= bsp;              
------------+------------+------------------------------------= ------------
 pg_catalog | danish     | configuration for danish lan= guage
 pg_catalog | dutch      | configuration for dutch= language
 pg_catalog | english    | configuration for english la= nguage
 pg_catalog | finnish    | configuration for finnish la= nguage
 pg_catalog | french     | configuration for french lan= guage
 pg_catalog | german     | configuration for german lan= guage
 pg_catalog | hungarian  | configuration for hungarian langu= age
 pg_catalog | italian    | configuration for italian la= nguage
 pg_catalog | norwegian  | configuration for norwegian langu= age
 pg_catalog | portuguese | configuration for portuguese language<= br>
 pg_catalog | romanian   | configuration for romanian langua= ge
 pg_catalog | russian    | configuration for russian la= nguage
 pg_catalog | simple     | simple configuration
 pg_catalog | spanish    | configuration for spanish la= nguage
 pg_catalog | swedish    | configuration for swedish la= nguage
 pg_catalog | turkish    | configuration for turkish la= nguage
 public     | hw_english | Hitwise configuration for th= e English language
(17 rows)

target (9.4):

\dF
               List of text se= arch configurations
   Schema   |    Name    |   &= nbsp;          Description       &n= bsp;      
------------+------------+------------------------------------= ---
 pg_catalog | danish     | configuration for danish lan= guage
 pg_catalog | dutch      | configuration for dutch= language
 pg_catalog | english    | configuration for english la= nguage
 pg_catalog | finnish    | configuration for finnish la= nguage
 pg_catalog | french     | configuration for french lan= guage
 pg_catalog | german     | configuration for german lan= guage
 pg_catalog | hungarian  | configuration for hungarian langu= age
 pg_catalog | italian    | configuration for italian la= nguage
 pg_catalog | norwegian  | configuration for norwegian langu= age
 pg_catalog | portuguese | configuration for portuguese language<= br>
 pg_catalog | romanian   | configuration for romanian langua= ge
 pg_catalog | russian    | configuration for russian la= nguage
 pg_catalog | simple     | simple configuration
 pg_catalog | spanish    | configuration for spanish la= nguage
 pg_catalog | swedish    | configuration for swedish la= nguage
 pg_catalog | turkish    | configuration for turkish la= nguage
(16 rows)

So, the last record "hw_english" does not show in the target.

This is the parameter in postgresql file, same on both locations.
# default configuration for text search
default_text_search_config =3D 'pg_catalog.english'

Unfortunately, I am not sure about tsearch2, it is new system that I = inherited not too long ago. So, the production is still on 8.3, but dev/sta= ging that was built recently, is on 9.4. The engineer who installed it said= he used it from Puppet module for postgresql... He is not sure about tsearch2 module either. Do you know how= can I find it? Or how can I install it? It seems like some gin indices are= missing. I need to find out what is missing...

THANK YOU for your help



From: Adrian Klaver <a= drian.klaver@aklaver.com>
Sent: Tuesday, April 16, 2019 1:02 PM
To: Julie Nishimura; pgsql-general@lists.postgresql.org
Subject: Re: text search configuration missing while migration from = 8.3 to 9.4
 
On 4/16/19 12:02 PM, Julie Nishimura wrote:
> Correction: tables are not missing, but some records from the tables <= br> > missing. How can we migrate them properly from 8.3 to 9.4?

This is going to need some more info:

1) What records?

2) 8.3 was the version where text search was integrated into core. Where you using tsearch2 before you moved to 8.3?

3) If the answer to 2) is yes, did you have the contrib/tsearch2  modu= le
installed in 8.3 for backwards compatibility?

4) How was the 9.4 version installed?

4) If the answer to 3) is yes did you install the contrib/tsearch2 in
the 9.4 cluster?

>
> Sent from my iPhone
>
> On Apr 16, 2019, at 10:32 AM, Julie Nishimura <juliezain@hotmail.co= m
> <mailto:juliezain@hotmail.= com>> wrote:
>
>> Hello, we recenlty created fresh install of 9.4, created new dbs, = and
>> pg_dumped and restored correspondent dbs from 8.3 (pg_dump|psql, b= eing
>> on target). Now we've noticed that some of `pg_catalog.pg_ts_confi= g`
>> and pg_ts_dict tables are missing, making text search on 9.4 very =
>> slow. We tried to insert missing records from pg_catalog.pg_ts_con= fig,
>> but it does not help. What is the proper procedure for it? Please =
>> help, thanks!


--
Adrian Klaver
adrian.klaver@aklaver.com
--_000_BYAPR08MB50140786DCCBC9FDE7DD0137AC240BYAPR08MB5014namp_--