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 1jbtyb-0004kq-BB for pgsql-general@arkaria.postgresql.org; Thu, 21 May 2020 22:47:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jbtya-00089D-45 for pgsql-general@arkaria.postgresql.org; Thu, 21 May 2020 22:47:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbtyZ-00088m-AW for pgsql-general@lists.postgresql.org; Thu, 21 May 2020 22:47:43 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbtyS-0004WF-90 for pgsql-general@postgresql.org; Thu, 21 May 2020 22:47:41 +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 04LMlPNa017697; Thu, 21 May 2020 18:47:25 -0400 From: Tom Lane To: Adrian Klaver cc: Andrus , pgsql-general Subject: Re: Query returns no rows in pg_basebackup cluster In-reply-to: References: <2B1267647FD14565B73801AF12CA1A88@dell2> Comments: In-reply-to Adrian Klaver message dated "Thu, 21 May 2020 15:13:27 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17695.1590101245.1@sss.pgh.pa.us> Date: Thu, 21 May 2020 18:47:25 -0400 Message-ID: <17696.1590101245@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Adrian Klaver writes: > On 5/21/20 1:20 PM, Andrus wrote: >> In windows pg_basebackup was used to create base backup from Linux server. > Are you referring to two different instances of Postgres on Windows? No, what it sounds like is the OP tried to physically replicate a database on another platform with completely different sorting rules. Which means all his text indexes are corrupt according to the destination platform's sorting rules, which easily explains the observed misbehavior (ie, index searches not finding the expected rows). REINDEX would fix it. But the major point here is you can't just ignore a collation mismatch, which in turn implies that you can't do physical replication from Linux to Windows, or vice versa (and most other cross-platform cases are just as dangerous). >> Database in Windows is in read-only (recovery) mode so it cannot changed. Then you might as well just rm -rf it (or whatever the equivalent Windows incantation is). On Windows, that database is broken and useless. regards, tom lane