Обсуждение: Postgresql 12.9 = Operator issue

Поиск
Список
Период
Сортировка

Postgresql 12.9 = Operator issue

От
"Satish Nayak [NMC - IT]"
Дата:

Greeting All,

 

After upgrade to postgresql 12.9 from 12.6 , some of the statements having ”=” operator not returning any rows..

 

Eg :

 

----------------------------------------------------------------------------------------------------------------------------------

 PostgreSQL 12.9 (Ubuntu 12.9-2.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit

(1 row)

=> \x

Expanded display is on.

=> select * from store_item_details  where medicine_name ='DEXTROSE 10% :500 ML';

(0 rows)

 

 

Where as in 12.6 version , we are able to see the row.

 

-[ RECORD 1 ]----------------------------------------------------------------------------------------------------------------------------------------

version | PostgreSQL 12.6 (Ubuntu 12.6-1.pgdg16.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609, 64-bit

 

hmsuat=# \x

Expanded display is off.

hmsuat=# select * from store_item_details  where medicine_name ='DEXTROSE 10% :500 ML';

hmsuat=# select count(1) from store_item_details  where medicine_name ='DEXTROSE 10% :500 ML';

 count 

-------

     1

(1 row)

 

 

Request your help to know wtr this is a bug or not. If bug , is there any work around ?

 

Regards,

 

Satish Chikkathammaiah,

Manager Database Administration

 

NMC Healthcare Ltd (In Administration)

Registered Office: DD#16 - 109 - 001, 16th Floor, WeWork Hub71,

Al Khatem Tower, ADGM Squre, Al Mariya Island, Abu Dhabi, UAE.

T: +971 2 207 6217 Ext: 15086  |  F: +971 2 633 2256  |  M: +971 509148678

9th Floor, Al Ain Tower, Khalidiyah, Abu Dhabi, UAE

 

 

'Classification: Restricted
On 27 September 2020 a number of the entities of the NMC Healthcare group were placed into administration under Abu Dhabi Global Market Regulations. Richard Fleming and Ben Cairns have been appointed Joint Administrators in this regard to manage the affairs, business and property of the relevant companies in administration as agents without personal liability. In that capacity the Joint Administrators have delegated certain powers to the board of directors to act as agents of the relevant companies. For full information regarding these appointments please redirect to this web page: https://nmc.ae/
This e-mail message including any attachments is intended solely for the addressee(s) and may contain privileged information. If you have received this email by mistake, please notify the sender and delete the message destroying any hard copies of the original message. This message does not contain financial instructions or commitments of any kind. Any views expressed in this message are those of the individual sender. NMC accepts no liability for any damage caused by any virus/worms transmitted by this email..

Re: Postgresql 12.9 = Operator issue

От
Julien Rouhaud
Дата:
Hi,

On Fri, Feb 18, 2022 at 02:59:18PM +0000, Satish Nayak [NMC - IT] wrote:
> 
> After upgrade to postgresql 12.9 from 12.6 , some of the statements having
> ”=” operator not returning any rows..
> Eg :
> 
>  PostgreSQL 12.9 (Ubuntu 12.9-2.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04)
9.3.0,64-bit
 
> => select * from store_item_details  where medicine_name ='DEXTROSE 10% :500 ML';
> (0 rows)
> 
> Where as in 12.6 version , we are able to see the row.
> 
> version | PostgreSQL 12.6 (Ubuntu 12.6-1.pgdg16.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu
5.4.0-6ubuntu1~16.04.12)5.4.0 20160609, 64-bit
 
> hmsuat=# select * from store_item_details  where medicine_name ='DEXTROSE 10% :500 ML';
> hmsuat=# select count(1) from store_item_details  where medicine_name ='DEXTROSE 10% :500 ML';
>  count
> -------
>      1
> (1 row)
> 
> Request your help to know wtr this is a bug or not. If bug , is there any work around ?

Did you also upgrade your system at the same time?  It you upgraded the lib or
ICU library you can definitely corrupt your indexes, see for instance
https://wiki.postgresql.org/wiki/Locale_data_changes or
https://postgresql.verite.pro/blog/2018/08/27/glibc-upgrade.html.

A REINDEX of all indexes on collatable datatype would fix the problem.



Re: Postgresql 12.9 = Operator issue

От
"David G. Johnston"
Дата:
On Friday, February 18, 2022, Satish Nayak [NMC - IT] <satish.nayak@nmc.ae> wrote:

Greeting All, 

After upgrade to postgresql 12.9 from 12.6 , some of the statements having ”=” operator not returning any rows..



You apparently also upgraded your OS.  That is where you problem lies.  You will need to rebuild indexes.

 David J.

Re: Postgresql 12.9 = Operator issue

От
"David G. Johnston"
Дата:
On Friday, February 18, 2022, Julien Rouhaud <rjuju123@gmail.com> wrote:

Did you also upgrade your system at the same time?

Viewing the two provided version outputs confirms that the OP did indeed upgrade the O/S.

David J.

Re: Postgresql 12.9 = Operator issue

От
Julien Rouhaud
Дата:
Le ven. 18 févr. 2022 à 23:11, David G. Johnston <david.g.johnston@gmail.com> a écrit :
On Friday, February 18, 2022, Julien Rouhaud <rjuju123@gmail.com> wrote:

Did you also upgrade your system at the same time?

Viewing the two provided version outputs confirms that the OP did indeed upgrade the O/S.

oh right, I spent too much time reformatting the email that I didn't even notice the 4y bump in Ubuntu version.