Re: Notify client when a table was full

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Raymond O'Donnell <rod(at)iol(dot)ie>
Cc: hmidi slim <hmidi(dot)slim2(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Notify client when a table was full
Date: 2018-01-21 12:27:18
Message-ID: 20180121122718.GH1311@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jan 19, 2018 at 03:40:01PM +0000, Raymond O'Donnell wrote:
> On 19/01/18 15:34, hmidi slim wrote:
>> Hi,
>> I'm looking for a function in postgresql which notify the client if a
>> table was full or not.So I found the function Notify
>> https://www.postgresql.org/docs/9.0/static/sql-notify.html.
>> This function send a notification when a new action was done to the
>> table. Is there a way to send a notification only  when the table was
>> full and no future actions (insertion of new rows for examples) will be
>> done. I was connected to an external api and saving the data received
>> from it to a postgres database and I want to be notified when the table
>> was full and no rows will be inserted. Does it realizable or Should I
>> create a trigger and listens for every insertion and notify the client?
>
> How do you define "full"?

There could be two definitions here:
1) A table contains more data than a customly-defined amount of data
on-disk.
2) The partition where the table data is located runs out of disk
space.
--
Michael

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rafał Zabrowarny 2018-01-21 13:40:03 License question regarding distribution of binaries
Previous Message Hannes Erven 2018-01-21 04:00:29 Re: array_agg and/or =ANY doesn't appear to be functioning as I expect