Re: Monitoring the sequence cycles

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Monitoring the sequence cycles
Date: 2009-08-20 15:23:41
Message-ID: 13ec0c19ad61df63f3b85a15978a1570@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

> I'm looking for a way to track the wrap arounds of cycle sequences.
>
> I also couldn't find the view/catalog where sequence definitions are
> kept; this could be a good place to store at least the timestamp of the
> last wrap around.

You can query: select * from sequence_name;

> I'm looking for a way to log all wrap arounds, thought

I honestly doubt such a feature would be added to the system catalog,
but it certainly might be a nice thing to output to the logs. You might
want to add your request to the wiki so it doesn't get lost:

http://wiki.postgresql.org/wiki/Todo

One thing you can do at the moment is track how close the sequence is
getting near its maxvalue, and thus have an idea of when it is about
to cycle. The check_postgres program can do this for you:

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

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
End Point Corporation
PGP Key: 0x14964AC8 200908201120
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAkqNadIACgkQvJuQZxSWSsg9cQCcDm9HzBzBcQL6Yj8rKKoFDtc8
100AnikYzW4quROeThMCsBjfd7aungm2
=5uI0
-----END PGP SIGNATURE-----

In response to

Browse pgsql-general by date

  From Date Subject
Next Message leif 2009-08-20 15:47:42 Connection name on ECPGdeallocate ?
Previous Message Scara Maccai 2009-08-20 15:07:47 Re: Clustering with enough work_mem: copy heap in mem?