From: | gparc(at)free(dot)fr |
---|---|
To: | yudhi <learnerdatabase99(at)gmail(dot)com> |
Cc: | Juan Rodrigo Alejandro Burgos Mella <rodrigoburgosmella(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Controlling resource utilization |
Date: | 2024-04-17 08:14:23 |
Message-ID: | 1209304795.181772545.1713341663603.JavaMail.zimbra@free.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> De: "yudhi" <learnerdatabase99(at)gmail(dot)com>
> À: "gparc" <gparc(at)free(dot)fr>
> Cc: "Juan Rodrigo Alejandro Burgos Mella" <rodrigoburgosmella(at)gmail(dot)com>,
> "pgsql-general" <pgsql-general(at)lists(dot)postgresql(dot)org>
> Envoyé: Mercredi 17 Avril 2024 09:42:49
> Objet: Re: Controlling resource utilization
> On Wed, 17 Apr, 2024, 12:40 pm , < [ mailto:gparc(at)free(dot)fr | gparc(at)free(dot)fr ] >
> wrote:
>>> De: "Juan Rodrigo Alejandro Burgos Mella" < [
>>> mailto:rodrigoburgosmella(at)gmail(dot)com | rodrigoburgosmella(at)gmail(dot)com ] >
>>> À: "yudhi s" < [ mailto:learnerdatabase99(at)gmail(dot)com |
>>> learnerdatabase99(at)gmail(dot)com ] >
>>> Cc: "pgsql-general" < [ mailto:pgsql-general(at)lists(dot)postgresql(dot)org |
>>> pgsql-general(at)lists(dot)postgresql(dot)org ] >
>>> Envoyé: Mardi 16 Avril 2024 22:29:35
>>> Objet: Re: Controlling resource utilization
>> ALTER ROLE <your-username> SET statement_timeout = '<time_unit>';
>> Regards
>> Gilles
> Thank you so much. That helps.
> This statement is succeeding for user as I executed. So it's working I believe.
> But to immediately verify without manually running queries and waiting for it to
> be auto killed to confirm, Is there any system table which we can verify to see
> if this setting is effective, as because I don't see any such columns in
> pg_user or pg_role which shows the statement_timeout.
> And is there a way to put similar cap/restrictions on other db resources like
> cpu, memory, I/O at specific user/role level?
To verify the setting, you can use this command in psql : \drds <your-username>
Concerning system resources like CPUs it's not possible.
You can use pg_settings view to see which setting you can change and in which context : [ https://www.postgresql.org/docs/current/view-pg-settings.html | https://www.postgresql.org/docs/current/view-pg-settings.html ]
Regards
Gilles
From | Date | Subject | |
---|---|---|---|
Next Message | jack | 2024-04-17 13:06:31 | constant crashing hardware issue and thank you TAKE AWAY |
Previous Message | yudhi s | 2024-04-17 07:42:49 | Re: Controlling resource utilization |