pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrus <kobruleht2@hot.ee>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Query returns no rows in pg_basebackup cluster
Date: Thu, 21 May 2020 16:34:22 -0700
Message-ID: <f05e0746-0553-bd13-e8ae-1617bd3d72d8@aklaver.com> (raw)
In-Reply-To: <CAKFQuwZ7UzCgCGNTSGoO4OXtgy_ZhLPN5uA_bwEX8T2Txm_iwA@mail.gmail.com>
References: <2B1267647FD14565B73801AF12CA1A88@dell2>
	<ea1e505d-d049-1d1d-e3b3-e655928949b8@aklaver.com>
	<17696.1590101245@sss.pgh.pa.us>
	<7736da96-5b03-d334-1be5-e593fc54d40b@aklaver.com>
	<CAKFQuwZ7UzCgCGNTSGoO4OXtgy_ZhLPN5uA_bwEX8T2Txm_iwA@mail.gmail.com>

On 5/21/20 4:06 PM, David G. Johnston wrote:
> On Thu, May 21, 2020 at 3:57 PM Adrian Klaver <adrian.klaver@aklaver.com 
> <mailto:adrian.klaver@aklaver.com>> wrote:
> 
>     On 5/21/20 3:47 PM, Tom Lane wrote:
>      > Adrian Klaver <adrian.klaver@aklaver.com
>     <mailto:adrian.klaver@aklaver.com>> 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





view thread (25+ messages)  latest in thread

Message-ID: <f05e0746-0553-bd13-e8ae-1617bd3d72d8@aklaver.com>
Permalink:  ../f05e0746-0553-bd13-e8ae-1617bd3d72d8@aklaver.com/
Also on:    postgresql.org/message-id/f05e0746-0553-bd13-e8ae-1617bd3d72d8@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, david.g.johnston@gmail.com, tgl@sss.pgh.pa.us, kobruleht2@hot.ee
  Subject: Re: Query returns no rows in pg_basebackup cluster
  In-Reply-To: <f05e0746-0553-bd13-e8ae-1617bd3d72d8@aklaver.com>
  References: <2B1267647FD14565B73801AF12CA1A88@dell2> <ea1e505d-d049-1d1d-e3b3-e655928949b8@aklaver.com> <17696.1590101245@sss.pgh.pa.us> <7736da96-5b03-d334-1be5-e593fc54d40b@aklaver.com> <CAKFQuwZ7UzCgCGNTSGoO4OXtgy_ZhLPN5uA_bwEX8T2Txm_iwA@mail.gmail.com> <f05e0746-0553-bd13-e8ae-1617bd3d72d8@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox