postgres authentication external I have to implement some safety authentication rules on postgresql DB  with a windows server. For example, rules may be "users not used for a period longer than three months will be locked" or "postgres enforces account lockout after a set number of failed login attempts."

Using authentication "standard" ( md5 on pg_hba.conf) I think is not possible.  I think that with PAM it would work. However,  PAM does not exist on windows server. Any ideas?
Postgres has an option "valid until" that specifies user's password expiry Date&amp;time. but, I believe, what you are asking can be done as an application feature not the Database feature.