Re: Tablespace limit feature

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Tablespace limit feature
Date: 2014-11-04 17:46:11
Message-ID: 20141104174611.GC28859@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

* John R Pierce (pierce(at)hogranch(dot)com) wrote:
> On 11/4/2014 9:00 AM, Alejandro Carrillo wrote:
> >I need to limit the tablespace file because I need to control the
> >hard disk space used in a tablespace
>
> so what happens if a query does something that violates the quota?

It gets cancelled. See temp_file_limit.

> I can see one difficulty in implementation would be just keeping
> track of how much space is used in a tablespace, thats not done
> right now at all as far as I know. every time a new block is
> allocated, a tablespace size catalog table would have to be
> updated.... and oh no, what happens if THAT table grows and
> overflows the quota of the default tablespace where the catalog is
> maintained?

There are a bunch of questions, but I doubt we'd apply the quota to
system catalogs regardless. That does lead to an interesting question
about quotas for number of tables, or indexes, or whatever, but I tend
to doubt that's as much of an issue. Such a quota isn't to address
individuals who are actively attempting to attack the system (there's
lots of ways to cause problems if you've got SQL-level access) but
rather just to manage space limitations among different individuals
using the system.

Thanks,

Stephen

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bernd Helmle 2014-11-04 18:23:21 Re: COPY TO returning empty result with parallel ALTER TABLE
Previous Message John R Pierce 2014-11-04 17:36:00 Re: Tablespace limit feature