Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g9beS-0004j1-9N for pgsql-general@arkaria.postgresql.org; Mon, 08 Oct 2018 19:57:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g9beQ-0007du-K8 for pgsql-general@arkaria.postgresql.org; Mon, 08 Oct 2018 19:57:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g9beO-0007dm-Rx for pgsql-general@lists.postgresql.org; Mon, 08 Oct 2018 19:57:10 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g9beI-0007vR-7K for pgsql-general@postgresql.org; Mon, 08 Oct 2018 19:57:07 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 6A6AC21E5F; Mon, 8 Oct 2018 15:57:00 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 08 Oct 2018 15:57:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=o /yl/2TbhmTKoMD0DBI3m3BPGywRV3RQs2zlRqQDJ34=; b=HcyZLFQ3EoqY7yg6/ KGUmE97w2Ly2tRbZCHHPnwce+9uNRrlxRCCl0/Io/fpbKmgxMC4ffviuhuse9Zdb B/K/chxaXmCQu2yedUADdaiODfru0r8S6p1CmnzWtZ+Kk7Rfxksdu06wsXsQARVZ S+NriAZMKQqJZYEdR5mavNU9oX6e8Ls+O017UJX03QuP8Tqub23g5UMBsDIIygZz O0lR9UMis7UwCOln+7pwxVpGMbQxgXPOJdHD4rh7JqxxyomQ1A0ecBahPYNurkIm ijRxxkaMq47sXHrRxAntQkSBIDIce6j5gItMIHP5rfTvGlD6r3t9qYL9fXAbpg3X D5Wgg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=o/yl/2TbhmTKoMD0DBI3m3BPGywRV3RQs2zlRqQDJ 34=; b=pUECdI4pkU7jtiZ//IPPIXzOnVe8/+raGBt6rcFNkHT5ubZQPy8Gq431M RRJ8FcCQt0tpIWdTfwXT2hXl4rrFs/kWyKaPpSD3nwSW2i8XBGIErnIOEAd/yaCb lLmKN+RvmTQRuHPw5NHKEmY9kGWLq415Qxj9y1Shx1CLjptE+Xd0UPSQgtki/XSW +4zVIrD7yF+iksUid+MOdRi4dRonakgmuEoJGLc1hfkB4mCkMdZjBqfYOUeMbPiM gl2yJTCzLKeKCScYOlQlewhoNsE0NaSNu7AjKldP6aC+oPoa6hvIqUQHolOMwcrE eitu66L1mX8eDlcH/Y903ecUWeS0A== X-ME-Sender: X-ME-Proxy: Received: from [192.168.1.3] (unknown [71.212.134.3]) by mail.messagingengine.com (Postfix) with ESMTPA id C3529E4899; Mon, 8 Oct 2018 15:56:59 -0400 (EDT) Subject: Re: FTS trigger works 1 at a time, but fails with bulk insert script To: Malik Rumi Cc: pgsql-general@postgresql.org References: From: Adrian Klaver Message-ID: Date: Mon, 8 Oct 2018 12:56:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 10/8/18 12:29 PM, Malik Rumi wrote: > 1. This code is entry_search_vector_trigger(), one of 3 trigger > functions based on the Django model that created the site. > 2. So this is the trigger definition (as far as I know) and it is on the > Entry table. There is also a Tag table and the Tags intersection table. > 3. Uhh, I'm not sure. I assume this is it, that when a new entry is > posted, the function that parses the entry into searchable text and > indexes the words is called. But I can tell you I got this code from > this blog post: > blog.lotech.org/postgres-full-text-search-with-django.html > . I > asked the author about this issue. He said he wasn't sure wthout > debugging if it was something he left out or something I did wrong. > 4. Postgresql 9.4. Yea, I know, I should upgrade... Your function name does not match up with the code on the site, so we will need to see the actual trigger/function. In psql do: \d entry to see the trigger definition and then post it here. Also from that definition you can get the function name. Again in psql do: \ef fnc_name to confirm the function is the one you think it is. Would also be helpful to see the script you wrote to do the bulk insert. > > */“None of you has faith until he loves for his brother or his neighbor > what he loves for himself.”/* > > -- Adrian Klaver adrian.klaver@aklaver.com