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 1jbu7y-00051G-HG for pgsql-general@arkaria.postgresql.org; Thu, 21 May 2020 22:57:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jbu7x-0006Xn-8D for pgsql-general@arkaria.postgresql.org; Thu, 21 May 2020 22:57:25 +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 1jbu7w-0006Xg-6G for pgsql-general@lists.postgresql.org; Thu, 21 May 2020 22:57:25 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbu7t-0006ts-D2 for pgsql-general@postgresql.org; Thu, 21 May 2020 22:57:23 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 74F865C0100; Thu, 21 May 2020 18:57:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 21 May 2020 18:57:19 -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=fm3; bh=i BffGuzMK3bYqbP1fzafFrZWAwf1M4Hu0aepmyXMvwM=; b=cJ9pJGXIUA+rPJ87g HEDl87aaLd0coPLot+GGz8MBJ8uMr8XLbm/4bio6SFFG99mc6yuaUPwEgwUnVslL qFQO12ATYdT5mj2mrgs7BBbxVfXfSQ7d3gUZoF0gjFKR2eGuZRs+d1Q0C47Iy+X6 6StaB8GZYB077CW8REl3w8B5VpTAXsqtqxf94w9fKrvydXkcI4UnWsQXBR/MNjus kXfyf3MBDu95wdvv7cY++pIIF9hogktm3CAnAvVhbYtmippuSM+ptpGw5xxfviZU ZmrZThr+3tYUY7p02aIXOUykUiL9SyzszfMGsTBaMdrIvCxaPQ+Wi0roZx4QD/kt w2qlw== 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=fm2; bh=iBffGuzMK3bYqbP1fzafFrZWAwf1M4Hu0aepmyXMv wM=; b=QsaeojTwqJdKB6Gc0YV1JmJMyjVYtEDMX8kwFCkwDT0KfRJQAfhWP7f5a QoG3YJwdNSwfQbXFH926VUW3K3VFb50IWLGRkpPD+Wn3UgUZJAGfyqOO0/pNNwez x/92A9wCAIm5AOQY5YPoj6GBV4XnBK3e2Ab+ByaDHeN/JQ7zoaPZmZMtqMK1l/Bl uK8G3ujg8U6fIhKwl34JerXvkEr3tQ8mWuJimIgR+SVulXN/xz1st8rLqW8BFfMy qxlHCL6aXhwB5D6lhuP2zumTYwN8ZGAkIe5xwZZzi4feFtUI0xpHXCetuw607MP1 JJ6ogOO0Bzx1ElzUD94TOv9TI8vzw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudduvddgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepteejvdetff ejuedvleeifeefheeutdfhgfdvhffhhfekvdduveegvdejudefgfevnecukfhppeejhedr udejvddrhedrvdefudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 3DF603280059; Thu, 21 May 2020 18:57:18 -0400 (EDT) Subject: Re: Query returns no rows in pg_basebackup cluster To: Tom Lane Cc: Andrus , pgsql-general References: <2B1267647FD14565B73801AF12CA1A88@dell2> <17696.1590101245@sss.pgh.pa.us> From: Adrian Klaver Message-ID: <7736da96-5b03-d334-1be5-e593fc54d40b@aklaver.com> Date: Thu, 21 May 2020 15:57:17 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <17696.1590101245@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 5/21/20 3:47 PM, Tom Lane wrote: > 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). Well what I was trying to figure out was: "Windows server this query returns 0 rows. In Windows server same query using like select * from firma1.desktop where baas like '_LOGIFAI' returns properly 16 rows. " My suspicion is that first case is for the replicated database and failed for the reasons you mentioned and that the second case is for a 'native' Windows instance. Just trying to get confirmation. > > 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 > -- Adrian Klaver adrian.klaver@aklaver.com