thanks for response @ajinkya.
I can see in catalog table pg_user_mapping the umoptions column has tow(or more) obfuscated_password about user mapping, and the last obfuscated_password in array correspond to the last ALTER USER, in other word, ALTER USER add obfuscated_password in array umoptions
select * from pg_user_mapping ;
with this workaround i get the last password :
with sub as ( select unnest(umoptions) val from pg_user_mapping where umserver=oid_server), sub1 as ( select row_number() over (), val from sub where val like 'obfuscated_password=%'), sub2 as ( (select val from sub1 order by 1 desc limit 1) union all select * from sub where val not like 'obfuscated_password=%' ) select array_agg(val) from sub2 limit 1
maybe update the column umoptions in tablepg_user_mapping with this vale
We have escalated this issue to our engg team. Thank you for highlighting this issue.
We will update you when we hear from them.