From: | Adir Shaban <adirshaban1995(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Database fixed size |
Date: | 2016-09-28 12:47:14 |
Message-ID: | CAC55UGHH8+rPN5996C=7FCbUJ3MNJFh99UB1U37fGrA0DkLfiw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
So how did heroku limit the database size per user?
I thought about creating triggers on insert and updates but that will lead
to bad performance
On Wed, Sep 28, 2016, 15:31 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> writes:
> > Adir Shaban wrote:
> >> Is there anyway to limit a database size?
> >> For example, I need to create a database for user X and I don't want it
> to use more than 5 GB.
>
> > You can create a tablespace on a device with limited size.
> > Then you can create the database on that tablespace.
>
> Note the reference to tablespace. It's unwise to just put the whole
> cluster on a tiny device (or equivalently, attempt to solve this with
> OS-level disk quotas applied to the whole installation). The reason is
> that PG gets very unhappy if it runs out of WAL space. Hitting a limit
> on table size per se behaves a bit more sanely, though even there you
> can get into trouble --- for instance, in some situations VACUUM will
> try to allocate additional disk space, making recovery harder.
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2016-09-28 14:02:00 | Re: how to monitor the progress of really large bulk operations? |
Previous Message | Mike Sofen | 2016-09-28 12:34:10 | Re: how to monitor the progress of really large bulk operations? |