Search code examples
postgresqlamazon-web-servicesamazon-iampostgres-fdw

What happens when a User Mapping's Password Changes?


I would like to use a service with our Database, but it doesn't support Amazon RDS IAM Database authentication. My plan is to have a mock-database that only has tables it needs from the original postgres DB, and to have a script that refreshes the service's user's password on the real DB every time it expires (15 minutes).

What happens when I call ALTER USER MAPPING on the Foreign User? Does it reconnect to the server with a new username and password?


Solution

  • Yes, when you change the userid or password using ALTER USER MAPPING, it will reconnect the user. It may wait until the user actually requests something to authenticate, but the user will not know the difference.