Re: Disallow SET command in a postgresql server

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Fabio Rueda Carrascosa <avances123(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Disallow SET command in a postgresql server
Date: 2013-04-09 16:20:11
Message-ID: 51643FBB.70500@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On 04/09/2013 09:06 AM, Alvaro Herrera wrote:
>
> Fabio Rueda Carrascosa escribió:
>> My grant/revoke architecture is fine, you mean about costly cpu/ram queries?
>
> Sure. The SQL dialect supported by Postgres is Turing-complete, so
> people can write statements that consume arbitrary amounts of RAM and
> diskspace, and run for arbitrary amounts of time -- regardless of
> work_mem and other settings. (Actually, this was true even before the
> dialect got to be Turing-complete).

A simple example that can crush your machine if you aren't careful:

select generate_series(1,1000000000000);

Now run it on 4 connections.

Sincerely,

Joshua D. Drake

--
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Support, Training, Professional Services and Development
High Availability, Oracle Conversion, Postgres-XC
@cmdpromptinc - 509-416-6579

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2013-04-09 16:28:42 Re: Create a DBLink from PostrgeSQL 9.2 to Oracle 11g
Previous Message Merlin Moncure 2013-04-09 16:15:43 Re: Disallow SET command in a postgresql server