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 1fTCWu-0000Iw-JG for pgsql-general@arkaria.postgresql.org; Wed, 13 Jun 2018 20:38:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fTCWt-0006oe-0j for pgsql-general@arkaria.postgresql.org; Wed, 13 Jun 2018 20:38:07 +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 1fTCWs-0006oU-P1 for pgsql-general@lists.postgresql.org; Wed, 13 Jun 2018 20:38:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fTCWq-0008SG-Ak for pgsql-general@postgresql.org; Wed, 13 Jun 2018 20:38:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w5DKc1mf032730; Wed, 13 Jun 2018 16:38:01 -0400 From: Tom Lane To: Andrey Lizenko cc: pgsql-general@postgresql.org Subject: Re: Replica string comparsion issue In-reply-to: References: Comments: In-reply-to Andrey Lizenko message dated "Wed, 13 Jun 2018 22:10:18 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32728.1528922281.1@sss.pgh.pa.us> Date: Wed, 13 Jun 2018 16:38:01 -0400 Message-ID: <32729.1528922281@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andrey Lizenko writes: > I'm observing strange behaviour on comparing ::text field with string while > quering replica. These symptoms seem consistent with the theory that the replica's index for that column (symbols_aggregates_uniq) is corrupt. I think your casts etc are just serving to defeat selection of an indexscan. Why it's corrupt, I dunno, but you might try forcing a reindex on the master. regards, tom lane