Set aurora_replica_read_consistency in DB cluster parameters

0

I'm trying to set the a default value for the parameter aurora_replica_read_consistency as in the docs https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-write-forwarding.html#aurora-global-database-write-forwarding-params The parameter is missing from DB cluster parameters or DB parameters and it seems cannot be added manually. Is there a way to set a default value? Please note that setting this parameter for every session is not an option.

1개 답변
1

Hi, thank you for asking your question.

aurora_replica_read_consistency is session level parameter, so you cannot set this parameter via parameter group directly. However, please use init_connect to set this parameter instead. This parameter can be used for a string to be executed by the server for each client that connects. https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_init_connect

Please note:

  • For users that have the SUPER privilege, the content of init_connect is not executed.
  • Always set the aurora_replica_read_consistency parameter for any session for which you want to forward writes.
  • If you set aurora_replica_read_consistency parameter by using init_connect, all connections will be enabled aurora_replica_read_consistency parameter. It means, every query will be forwarded to primary cluster. To avoid this per session, you need to set aurora_replica_read_consistency as blank using SET SESSION query.

I hope this might help.

AWS
답변함 일 년 전
  • Thanks for the reply, the init_connect will do the trick. Anyway, the fact that is a session parameter is not incompatible to assigning a default value. It has already a default value chosen by AWS (the empty value) that affects the way the server works in a global scenario.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠