Re: Notify client when a table was full

From: Vincenzo Romano <vincenzo(dot)romano(at)notorand(dot)it>
To: John McKown <john(dot)archie(dot)mckown(at)gmail(dot)com>
Cc: Steve Atkins <steve(at)blighty(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Notify client when a table was full
Date: 2018-01-22 14:15:18
Message-ID: CAHjZ2x7jsXMkQ0gQFJhTMV_5GUHehrPh7Q3rxHHzR=LUCiic9Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2018-01-22 14:58 GMT+01:00 John McKown <john(dot)archie(dot)mckown(at)gmail(dot)com>:
> On Mon, Jan 22, 2018 at 2:07 AM, Steve Atkins <steve(at)blighty(dot)com> wrote:
>>
>>
>> > On Jan 21, 2018, at 6:44 PM, Vincenzo Romano
>> > <vincenzo(dot)romano(at)notorand(dot)it> wrote:
>> >
>> > 2018-01-21 19:31 GMT+01:00 Francisco Olarte <folarte(at)peoplecall(dot)com>:
>> >> On Sun, Jan 21, 2018 at 1:27 PM, Michael Paquier
>> >> <michael(dot)paquier(at)gmail(dot)com> wrote:
>> >>> On Fri, Jan 19, 2018 at 03:40:01PM +0000, Raymond O'Donnell wrote:
>> >> ...
>> >>>> How do you define "full"?
>> >
>> > The only possible and meaningful case, IMHO, as stated by David
>> > earlier, is "file system full".
>>
>> If your filesystem is full you're pretty much off the air. It's something
>> that should never happen on a production system. So ... any automation
>> around "the filesystem is full" is going to be much the same as "the
>> server
>> is dead". You're unlikely to be able to do anything useful from the
>> app at that point, let alone from a trigger function.
>
>
> Well, I'll agree that PostgreSQL is likely "off the air". On my system
> (Linux/Intel), I use quotas to restrict a user's use of disk space. Yes,
> even the PostgreSQL user. I also, at times, use a separate filesystem for a
> database and use a TABLESPACE for the tables within it. This is easy to do
> with Linux because I can create a filesystem in a regular disk file. It
> doesn't perform as well as "native", but my system is not a highly used,
> performance oriented, system. Use of a separate filesystem and tablespaces
> is, I think, a decent way to control disk usage for "something" so that if
> "something" goes "insane", it can't really impact "others" very much. Of
> course, others may reasonably disagree with me on this. Each cat, his own
> rat.
>
>
>>
>>
>> If the answer involves handling the case where the file system is full
>> we're
>> not answering a useful question, and the original poster probably needs to
>> clarify.
>>
>> > Which is communicated by Postgres with the "Class 53 — Insufficient
>> > Resources" error codes.
>> > Please refer to official documentation like:
>> >
>> > https://www.postgresql.org/docs/10/static/errcodes-appendix.html
>> >
>> > For specific programming languages more details need to be checked.
>> >
>>
>> Cheers,
>> Steve
>
>
>
>
> --
> I have a theory that it's impossible to prove anything, but I can't prove
> it.
>
> Maranatha! <><
> John McKown

Going back to the original question, how can a client know that "a
table is full"?
I think that it should see commands like INSERTs and UPDATEs failing
with some error code.
Maybe those I pointed to.

All other facts seem to fall beyond the question scope, while being
really interesting and insightful.

--
Vincenzo Romano - NotOrAnd.IT
Information Technologies
--
NON QVIETIS MARIBVS NAVTA PERITVS

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John McKown 2018-01-22 14:19:00 Re: License question regarding distribution of binaries
Previous Message John McKown 2018-01-22 13:58:42 Re: Notify client when a table was full