Couple of things I should write down before I forget:
1. It's a bit cumbersome that the scram verifiers stored in
pg_authid.rolpassword don't have any clear indication that they're scram
verifiers. MD5 hashes are readily identifiable by the "md5" prefix. I
think we should use a "scram-sha-256:" for scram verifiers.
Actually, I think it'd be awfully nice to also prefix plaintext
passwords with "plain:", but I'm not sure it's worth breaking the
compatibility, if there are tools out there that peek into rolpassword.
Thoughts?
2. It's currently not possible to use the plaintext "password"
authentication method, for a user that has a SCRAM verifier in
rolpassword. That seems like an oversight. We can't do MD5
authentication with a SCRAM verifier, but "password" we could.
- Heikki