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 1jbuhu-00061G-Ne for pgsql-general@arkaria.postgresql.org; Thu, 21 May 2020 23:34:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jbuhr-0002LN-NV for pgsql-general@arkaria.postgresql.org; Thu, 21 May 2020 23:34:31 +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 1jbuhq-0002Ix-H5 for pgsql-general@lists.postgresql.org; Thu, 21 May 2020 23:34:31 +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 1jbuhn-0007BD-0c for pgsql-general@postgresql.org; Thu, 21 May 2020 23:34:30 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C789D5C0063; Thu, 21 May 2020 19:34:24 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 21 May 2020 19:34:24 -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=W MEA0d27QgOpR2FDGymrnwKjjMCL9zHavZVabPID5M8=; b=LtH8zS3fxJnSXtbA0 AQqgYJh1XOstyNqUcjQPrDHkwjpACe8DxMCePOfzn261TSioaoUF/y18hA07gLwZ quBk+9+Y+EXu0dXNtzAQ/Z6Cyi8EdAifJ9DLTxiFY2k2/gX733NgbMVnZ1gqkI9b DdZcp10rV1qMIGx7f+Goi+ia2CFOkMjuU8tM7jajS0FjBmtgXDQm8ZCwOdrWBKTw 0Zlc2ZnNz0e1HuT/itlzRDeRwBKs4NR9wonF4Q1Ao55WxkPwS6rO/qNimI2WVq6+ cn5WnmZJHenF0vYv79yQpoym3on1HwG1JLRfikDUyPyYME4EfoNCi3JhmCiWHj5M TTvFw== 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=WMEA0d27QgOpR2FDGymrnwKjjMCL9zHavZVabPID5 M8=; b=nL+u56vzDvjbbyIPekUuSPh0TE3IYEmlYVIuvohXuYUSFX9ybgAfpupbI uHmDc15yzTVEULBtheo2rngEPlmoRoKwFVUIehNC9XTfNOkP3HAxR+sDGKGoVFvh OCVgyx6iKQvfsYZqNz4nHrlyDd/uxYrUvihnVnqrdNdOqlfzUfQvSj3zEANOzofS KpC4wgDwkRcrvDI9LTdIa2E3qBAuXJSf2dvx5iDF2taYjoMil+4CViMedsBfRB/Y C/NGTLYfPykOtZEKqMTlNLB0kAuYgCqXdlGZ9nkoN/RBWhq3ffgzwlkhi1z8Wbnm YVOFMY/9pFlxJ8zEXRdM4k1QT0u2A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudduvddgvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeevveefveefueegffekkefhgeeiueffgfetueejvdfg hfeujeejhfekjeelgedtgeenucfkphepjeehrddujedvrdehrddvfedunecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgr vhgvrhesrghklhgrvhgvrhdrtghomh 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 803663280067; Thu, 21 May 2020 19:34:23 -0400 (EDT) Subject: Re: Query returns no rows in pg_basebackup cluster To: "David G. Johnston" Cc: Tom Lane , Andrus , pgsql-general References: <2B1267647FD14565B73801AF12CA1A88@dell2> <17696.1590101245@sss.pgh.pa.us> <7736da96-5b03-d334-1be5-e593fc54d40b@aklaver.com> From: Adrian Klaver Message-ID: Date: Thu, 21 May 2020 16:34:22 -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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 5/21/20 4:06 PM, David G. Johnston wrote: > On Thu, May 21, 2020 at 3:57 PM Adrian Klaver > wrote: > > 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. > > > Nothing in the OP's text suggests a different server is involved - > rather same server but LIKE vs equals. Aah, missed that. > > The LIKE query probably doesn't use an index and thus finds the relevant > data via sequential scan and equality checks on each record. > > David J. > -- Adrian Klaver adrian.klaver@aklaver.com