Re: changing sort_mem on the fly? - Mailing list pgsql-general

From Tom Lane
Subject Re: changing sort_mem on the fly?
Date
Msg-id 26417.1106898193@sss.pgh.pa.us
Whole thread Raw
In response to Re: changing sort_mem on the fly?  (Neil Conway <neilc@samurai.com>)
Responses Re: changing sort_mem on the fly?  ("Jim C. Nasby" <decibel@decibel.org>)
Re: changing sort_mem on the fly?  (Neil Conway <neilc@samurai.com>)
List pgsql-general
Neil Conway <neilc@samurai.com> writes:
> A malicious user who can execute SELECT queries can already consume an
> arbitrary amount of memory -- say, by disabling GEQO and self-joining
> pg_class to itself 50 times. I'm not sure that letting users modify
> sort_mem/work_mem actually increases the risk from malicious users.

The correct place for a sysadmin to limit memory usage would be in the
ulimit settings the postmaster starts under.  Of course, Neil's argument
still holds in general: anyone who can write arbitrary queries is not
going to have any difficulty in soaking up unreasonable amounts of
resources.  Trying to restrict that would probably make the system less
useful rather than more so.

            regards, tom lane

pgsql-general by date:

Previous
From: Neil Conway
Date:
Subject: Re: changing sort_mem on the fly?
Next
From: Miguel Angel Tribaldos Hervas
Date:
Subject: Import SVG file