Hello! I noticed a few things in the patch, please consider the following:
postgres.c:1076: elsewhere password_valid_until_timestamp is set to 0 when NULL, won't that result in unintended disconnection for users? postgres.c:99: it only checks the expiration in exec_simple_query, shouldn't it also be part of other methods (like exec_execute_message)? postgres.c:179: isn't the sys_cache_register_callback variable name a bit too generic, shouldn't it have a more specific name related to password expiration / authentication? postgres.c:1082: the errhint text should have a period at the end. postgres.c:4185: The comment for CheckPasswordExpiration says that the function terminates the connection with FATAL, but the termination is actually at the call site at line 1077. Maybe it would be better to move that if/error inside the function, as the comment explains?
