Search Postgresql Archives

Re: [HACKERS] Issues with generate_series using integer boundaries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 17, 2011 at 10:39 AM, David Johnston <polobo@xxxxxxxxx> wrote:
> Tangential comment but have you considered emitting a warning (and/or log
> entry) when you are 10,000-50,000 away from issuing the last available
> number in the sequence so that some recognition exists that any code
> depending on the sequence is going to fail soon?
>
> Also, during sequence creation you know the integer type being used so that
> maximum value is known and an overflow should not need to come into play (I
> guess the trade-off is the implicit "try-catch" [or whatever mechanism C
> uses] performance hit versus the need to store another full integer in the
> data structure).
>
> You could also give access to the "warning threshold" value so that the
> developer can change it to whatever value is desired (with a meaningful
> default of course).

There are already tools out there that can monitor this stuff - for
example, check_postgres.pl.

http://bucardo.org/check_postgres/check_postgres.pl.html#sequence

We tend to avoid emitting warnings for this kind of thing because they
can consume vast amounts of disk space, and a lot of times no one's
looking at them anyway.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux