在执行存储过程/函数的时候报错

ERROR: autonomous transaction failed to create autonomous session
DETAIL: FATAL: Invalid username/password,login denied. 有没有大佬帮忙分析一下试过好多版本的格式了,还是不行

这个报错根本不是密码格式问题,而是 openGauss 在创建自治事务时,无法通过 localhost 无密码连接到自身实例导致的。在 Docker 环境中,这通常是网络配置与认证规则不匹配引起的。

当你创建函数/存储过程时,openGauss 会自动创建一个自治事务,本质上是服务端通过 localhost (127.0.0.1) 建立一个无密码的本地连接。如果 listen_addresses 未配置 localhost ,或 pg_hba.conf 未允许本地免密登录,就会报 Invalid username/password 错误[^