disallow SET WORK_MEM

Lists: pgsql-general
From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: disallow SET WORK_MEM
Date: 2011-12-05 18:41:50
Message-ID: 20111205184150.GA28505@tux
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi @list,

is it possible to disallow "set work_mem to ..." for regular
(non-superuser) users?

Background: a shared database server with multiple users.

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: disallow SET WORK_MEM
Date: 2011-12-05 19:13:58
Message-ID: 201112051913.pB5JDwZ06885@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Andreas Kretschmer wrote:
> Hi @list,
>
> is it possible to disallow "set work_mem to ..." for regular
> (non-superuser) users?
>
> Background: a shared database server with multiple users.

We have discussed it and might offer that ability some day, but
currently there is no way to do that. There are so many ways to mess
things up with a bad query that we are unclear if restricting work_mem
is really helpful.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: disallow SET WORK_MEM
Date: 2011-12-05 20:00:57
Message-ID: 2911.1323115257@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Andreas Kretschmer wrote:
>> is it possible to disallow "set work_mem to ..." for regular
>> (non-superuser) users?

> We have discussed it and might offer that ability some day, but
> currently there is no way to do that. There are so many ways to mess
> things up with a bad query that we are unclear if restricting work_mem
> is really helpful.

Preventing people from setting an appropriate work_mem might well create
more denial-of-service problems than it prevents.

regards, tom lane