Re: Controlling resource utilization

From: gparc(at)free(dot)fr
To: Juan Rodrigo Alejandro Burgos Mella <rodrigoburgosmella(at)gmail(dot)com>
Cc: yudhi s <learnerdatabase99(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Controlling resource utilization
Date: 2024-04-17 07:10:16
Message-ID: 1024954288.180821153.1713337816069.JavaMail.zimbra@free.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> De: "Juan Rodrigo Alejandro Burgos Mella" <rodrigoburgosmella(at)gmail(dot)com>
> À: "yudhi s" <learnerdatabase99(at)gmail(dot)com>
> Cc: "pgsql-general" <pgsql-general(at)lists(dot)postgresql(dot)org>
> Envoyé: Mardi 16 Avril 2024 22:29:35
> Objet: Re: Controlling resource utilization

> In postgreSQL, that can be done at a session level, or at a general level (in
> the postgresql.conf configuration file)

> Atte
> JRBM

> El mar, 16 abr 2024 a las 15:18, yudhi s (< [ mailto:learnerdatabase99(at)gmail(dot)com
> | learnerdatabase99(at)gmail(dot)com ] >) escribió:

>> On Wed, 17 Apr, 2024, 1:32 am Juan Rodrigo Alejandro Burgos Mella, < [
>> mailto:rodrigoburgosmella(at)gmail(dot)com | rodrigoburgosmella(at)gmail(dot)com ] > wrote:

>>> Yes sir
>>> SET statement_timeout TO '<milliseconds>'

>>> Atte
>>> JRBM

>>> El mar, 16 abr 2024 a las 14:46, yudhi s (< [ mailto:learnerdatabase99(at)gmail(dot)com
>>> | learnerdatabase99(at)gmail(dot)com ] >) escribió:

>>>> Hi ,
>>>> We want to have controls around the DB resource utilization by the adhoc user
>>>> queries, so that it won't impact the application queries negatively. Its RDS
>>>> postgresql database version 15.4.
>>>> Saw one parameter as statement_timeout which restricts the queries to not run
>>>> after a certain time duration and queries will be automatically
>>>> killed/cancelled. However, I don't see any other options to set this at user
>>>> level, rather it's getting set for all or at session level. So I want to know
>>>> if there exists, anyway to control the database resource utilization specific
>>>> to users?
>>>> Regards
>>>> Yudhi

>> This will set the timeout at session level. However, We want to understand, if
>> it can be done at user/role level, so that any such adhoc user queries can be
>> auto killed or cancelled after the set time.

Or also at role/user level :
ALTER ROLE < your - username > SET statement_timeout = '<time_unit>' ;
Regards
Gilles

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message yudhi s 2024-04-17 07:42:49 Re: Controlling resource utilization
Previous Message Juan Rodrigo Alejandro Burgos Mella 2024-04-16 20:29:35 Re: Controlling resource utilization