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 1jc0cA-00085h-4e for pgsql-general@arkaria.postgresql.org; Fri, 22 May 2020 05:53:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jc0c7-00087k-HY for pgsql-general@arkaria.postgresql.org; Fri, 22 May 2020 05:52:59 +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 1jc0c7-00087d-9E for pgsql-general@lists.postgresql.org; Fri, 22 May 2020 05:52:59 +0000 Received: from portal-smtp-out.hot.ee ([194.126.101.125]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jc0c0-00029K-MQ for pgsql-general@postgresql.org; Fri, 22 May 2020 05:52:58 +0000 Received: from localhost (localhost [127.0.0.1]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id 06B0C1BE9; Fri, 22 May 2020 08:52:52 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at vm-hot-relay10.estpak.ee Received: from portal-smtp-out.hot.ee ([127.0.0.1]) by localhost (vm-hot-relay10.estpak.ee [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CwZ9y+exv0ZG; Fri, 22 May 2020 08:52:49 +0300 (EEST) Received: from mail.hot.ee (hot-relayhost1.estpak.ee [213.180.2.79]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id B8D43CC8; Fri, 22 May 2020 08:52:49 +0300 (EEST) Received: from dell2 (66-63-196-88.sta.estpak.ee [88.196.63.66]) (Authenticated sender: kobruleht2) by HOT-Relayhost1.estpak.ee (Postfix) with ESMTPSA id 49Swcv3gkcz2Bb; Fri, 22 May 2020 08:52:46 +0300 (EEST) Message-ID: From: "Andrus" To: "Tom Lane" , "Adrian Klaver" Cc: "pgsql-general" References: <2B1267647FD14565B73801AF12CA1A88@dell2> <17696.1590101245@sss.pgh.pa.us> In-Reply-To: <17696.1590101245@sss.pgh.pa.us> Subject: Re: Query returns no rows in pg_basebackup cluster Date: Fri, 22 May 2020 08:52:28 +0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 16.4.3528.331 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi! >No, what it sounds like is the OP tried to physically replicate a >database on another platform with completely different sorting rules. The sorting rules for this locale must be the same in both platforms. Only locale names are different. It looks like windows server does not recognize Linux locale name. >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). Lot of queries seems working properly. >REINDEX would fix it. REINDEX throws error ERROR: cannot execute REINDEX during recovery SQL state: 25006 > 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 is used in recovery mode to find proper recovery point and to get data from it in this point. Locales are actually same. In windows Postgres does not recognize Linux locale name. >> 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. Most queries seems to work. Database should examined to get accidently deleted data from it. Is making it read-write and index only solution or can it fixed in read-only database also, e-q forcing same local in postgres.conf Andrus.