Re: changing sort_mem on the fly?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>, Michael Fuhr <mike(at)fuhr(dot)org>, Lonni J Friedman <netllama(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: changing sort_mem on the fly?
Date: 2005-01-28 07:43:13
Message-ID: 26417.1106898193@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Neil Conway <neilc(at)samurai(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Miguel Angel Tribaldos Hervas 2005-01-28 08:58:01 Import SVG file
Previous Message Neil Conway 2005-01-28 06:34:26 Re: changing sort_mem on the fly?