Re: [GENERAL] Transaction ID Wraparound Monitoring

2015-08-04 Thread Jim Nasby
On 8/4/15 2:47 AM, Jan Keirse wrote: CAST (age(relfrozenxid) AS real) / CAST(trunc(((2^32)/2)-1-100) AS real) >AS perc_until_wraparound_server_freeze > > >(Note that we do this at the table level rather than the database level like >you did, though, so that we have the information we need to

Re: [GENERAL] Transaction ID Wraparound Monitoring

2015-08-04 Thread Jan Keirse
On Tue, Aug 4, 2015 at 6:24 AM, William Dunn wrote: > Hello Jan, > > I think your calculation is slightly off because per the docs when > PostgreSQL comes within 1 million of the age at which an actual wraparound > occurs it will go into the safety shutdown mode. Thus the calculation should > be (

Re: [GENERAL] Transaction ID Wraparound Monitoring

2015-08-03 Thread William Dunn
Hello Jan, I think your calculation is slightly off because per the docs when PostgreSQL comes within 1 million of the age at which an actual wraparound occurs it will go into the safety shutdown mode. Thus the calculation should be ((2^32)-1)/2-100 rather than just ((2^32)-1)/2 as I think you

Re: [GENERAL] Transaction ID Wraparound Monitoring

2015-07-30 Thread Adrian Klaver
On 07/30/2015 08:41 AM, Jan Keirse wrote: On Thu, Jul 30, 2015 at 2:56 PM, Adrian Klaver wrote: On 07/30/2015 02:55 AM, Jan Keirse wrote: Hello, we have some very write heavy databases and I have our monitoring system watch the transaction age of my databases to be alerted before we get into

Re: [GENERAL] Transaction ID Wraparound Monitoring

2015-07-30 Thread Jan Keirse
On Thu, Jul 30, 2015 at 2:56 PM, Adrian Klaver wrote: > On 07/30/2015 02:55 AM, Jan Keirse wrote: >> >> Hello, >> >> we have some very write heavy databases and I have our monitoring >> system watch the transaction age of my databases to be alerted before >> we get into problems in case autovacuum

Re: [GENERAL] Transaction ID Wraparound Monitoring

2015-07-30 Thread Adrian Klaver
On 07/30/2015 02:55 AM, Jan Keirse wrote: Hello, we have some very write heavy databases and I have our monitoring system watch the transaction age of my databases to be alerted before we get into problems in case autovacuum can't keep up to avoid transaction ID wraparound. The query I am execu