skip to Main Content

Although the value of the "statement_timeout" parameter in the config file in one of my Postgresql databases is "0", there is a timeout period in my database. What is the reason for this?

config file: enter image description here

When I check the timeout period:

Note: I have changed the timeout on a user basis for now. But why do I see a timeout period of "90 seconds" even though my user does not have any timeout period and this value is "0" in my config file?

postgresql version: 13

2

Answers


  1. If you want to know why you have a certain parameter setting, query pg_settings:

    SELECT setting, unit, source, sourcefile, sourceline
    FROM pg_settings
    WHERE name = 'statement_timeout';
    

    Then you know where you have to change the setting.

    Login or Signup to reply.
  2. Setting statement_timeout in postgresql.conf is not recommended because it would affect all sessions.

    The value of the statement_timeout parameter could be set as default in a specific ROLE, check this out:

    ALTER ROLE <specific_role> SET statement_timeout = 90;
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search