pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrus <kobruleht2@hot.ee>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Query returns no rows in pg_basebackup cluster
Date: Fri, 22 May 2020 08:52:28 +0300
Message-ID: <F46F2062ECC141E1B31DE872816E7F96@dell2> (raw)
In-Reply-To: <17696.1590101245@sss.pgh.pa.us>
References: <2B1267647FD14565B73801AF12CA1A88@dell2>
	<ea1e505d-d049-1d1d-e3b3-e655928949b8@aklaver.com>
	<17696.1590101245@sss.pgh.pa.us>

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.





view thread (25+ messages)  latest in thread

Message-ID: <F46F2062ECC141E1B31DE872816E7F96@dell2>
Permalink:  ../F46F2062ECC141E1B31DE872816E7F96@dell2/
Also on:    postgresql.org/message-id/F46F2062ECC141E1B31DE872816E7F96@dell2

 · 

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: kobruleht2@hot.ee, tgl@sss.pgh.pa.us, adrian.klaver@aklaver.com
  Subject: Re: Query returns no rows in pg_basebackup cluster
  In-Reply-To: <F46F2062ECC141E1B31DE872816E7F96@dell2>
  References: <2B1267647FD14565B73801AF12CA1A88@dell2> <ea1e505d-d049-1d1d-e3b3-e655928949b8@aklaver.com> <17696.1590101245@sss.pgh.pa.us> <F46F2062ECC141E1B31DE872816E7F96@dell2>

* 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