How can I set a custom setting on a Postgres database?

0

Setting a custom value works fine in Aurora. For example:

SET jwt.claims.email = 'user.email@example.com';
SET my.custom.setting = 'yes';

In vanilla Postgres, one can also associate custom settings with a database object:

ALTER DATABASE mydb SET my.custom.setting = 'yes';

But in Aurora, I get the response:

ERROR: permission denied to set parameter "my.custom.setting"; SQLState: 42501

even though the current user is the database owner. Why does this disparity between standard Postgres and Aurora (and presumably RDS) exist? This breaks compatibility with a current setup that we're trying to migrate to AWS.

1 回答
0

Amazon Aurora and Amazon RDS for PostgreSQL are managed database services. Both offer very high level of combability with existing open source offering. Some administration level actions are restricted to allow AWS to manage the database infrastcture. Setting parameters can be done using parameter groups as explained here: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Reference.ParameterGroups.html. You can see the list of supported parameters in the console or using CLI

In general if you are looking to migrate, you should approach your AWS account team. They will be able to provide you more in-depth guidance and assistance.

profile pictureAWS
已回答 1 年前
profile picture
专家
已审核 5 天前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则