Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6sn4-0003mK-4F for pgsql-general@arkaria.postgresql.org; Tue, 02 Feb 2021 10:20:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l6sn3-0002Aq-3D for pgsql-general@arkaria.postgresql.org; Tue, 02 Feb 2021 10:20:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6sTR-00045Z-Hs for pgsql-general@lists.postgresql.org; Tue, 02 Feb 2021 09:59:53 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l6sTP-0007dy-Pu for pgsql-general@postgresql.org; Tue, 02 Feb 2021 09:59:53 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 26FEF242FE6A9 for ; Tue, 2 Feb 2021 02:59:50 -0700 (MST) Date: Tue, 2 Feb 2021 02:59:50 -0700 (MST) From: unilynx To: pgsql-general@postgresql.org Message-ID: <1612259990157-0.post@n3.nabble.com> Subject: Index created with PGSQL11 on ubuntu 18.04 corrupt with PGSQL11 on ubuntu 20.04 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I'm using postgresql 11 builds from http://apt.postgresql.org/pub/repos/apt/ - I've got a database created under Ubuntu 18.04, and recently updated to Ubuntu 20.04. These are all docker builds I've got an index defined as follows CREATE UNIQUE INDEX entity_settings_wh_unique_rawdata ON wrd.entity_settings USING btree (attribute, digest(upper((unique_rawdata)::text), 'sha256'::text)) WHERE ((attribute IS NOT NULL) AND ((unique_rawdata)::text <> ''::text) And I've got a database which, when started under Ubuntu 18.04, finds one record for this query: SELECT * FROM "wrd"."entity_settings" T1 WHERE upper(left(T1."rawdata", 264))=upper(left('UT-MC', 264)) AND (T1."attribute"=3060); But if I start it with Ubuntu 20.04, with the same postgres version, the query doesn't find anything. Switching back to postgres 11 under 18.04 shows the record again, back to 11 under 20.04, and it's gone. Somehow postgres 11 under 20.04 cannot read the index created by 18.04 select version on 18.04 gives: PostgreSQL 11.10 (Ubuntu 11.10-1.pgdg18.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit select version on 20.04 gives: PostgreSQL 11.10 (Ubuntu 11.10-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit so as far as I can tell, these should be almost exactly the same. I can't find any difference in the environment either, and "SHOW ALL" is identical for both installations Any pointers on what I should be looking at why these two installations might view the same data differently? -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html