11

Can we set the query timeout option in the AWS Postgres instance?

I know we can do it locally in the configuration file if we have a local setup but not sure about AWS RDS.

Any help would be appreciated because due to the above issue CPU utilization is increasing.

1
  • 1
    Not sure how different the RDS version is, but in regular Postgres you don't need to edit a config file to achieve that, you can simply run set statement_timeout = ...; to change that value for your session. Commented Jan 13, 2020 at 12:26

1 Answer 1

21

You can achieve it by creating Parameter groups in AWS RDS

Please follow below steps.

  1. Go to AWS Console -> Amazon RDS
  2. Select Parameter Group to create parameter group enter image description here
  3. select appropriate version of Postgres,provide group name and click on create.
  4. Now select the created Parameter Group and search the parameter as statement_timeout enter image description here
  5. Click on Edit Parameter button and set the value inside the Values box enter image description here
  6. Save changes.
  7. Now while creating or modifying the database select newly created parameter group.
Sign up to request clarification or add additional context in comments.

4 Comments

If this answer helped you, could you please accept it
What is the default value, if you don't enter one?
@user2468842 the default is 0, which is equivalent to no timeout
Can the same be done per user?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.