Zhaoxun Yan <yan.zhaoxun@gmail.com> writes:
> The results are the same, 'dbname=repmgr' is the root cause of the error,
> since 'dbname=postgres' went well with both 'user=rep' and 'user=rewinder',
> while 'dbname=repmgr' generates exactly the same error.
As far as I can tell, you granted permissions on that function
in the postgres database, but not any other database. Function
permissions, like most others, are database-local in Postgres.
regards, tom lane