Re: transaction wrap around

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: transaction wrap around
Date: 2017-12-05 02:25:07
Message-ID: 24701.1512440707@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

John R Pierce <pierce(at)hogranch(dot)com> writes:
> On 12/4/2017 2:21 PM, chris kim wrote:
>> How would I investigate if my database is nearing a transaction wrap
>> around.

> it would be screaming bloody murder in the log, for one.

I think the simplest thing is to keep an eye on

select max(age(datfrozenxid)) from pg_database;

If that starts to approach two billion, or gets a lot larger than
autovacuum_freeze_max_age, you've got a problem.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Janes 2017-12-05 04:43:15 Re: transaction wrap around
Previous Message Michael Paquier 2017-12-05 02:20:43 Re: WAL reducing size