pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: John R Pierce <pierce@hogranch.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: transaction wrap around
Date: Mon, 04 Dec 2017 21:25:07 -0500
Message-ID: <24701.1512440707@sss.pgh.pa.us> (raw)
In-Reply-To: <0e852582-e8a3-20c9-540c-8cfb6fbe4d8e@hogranch.com>
References: <e1afb744-a950-6a1b-9cc4-85a6dc1795cc@propaas.com>
	<0e852582-e8a3-20c9-540c-8cfb6fbe4d8e@hogranch.com>

John R Pierce <pierce@hogranch.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




view thread (7+ messages)  latest in thread

Message-ID: <24701.1512440707@sss.pgh.pa.us>
Permalink:  ../24701.1512440707@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/24701.1512440707@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pierce@hogranch.com
  Subject: Re: transaction wrap around
  In-Reply-To: <24701.1512440707@sss.pgh.pa.us>
  References: <e1afb744-a950-6a1b-9cc4-85a6dc1795cc@propaas.com> <0e852582-e8a3-20c9-540c-8cfb6fbe4d8e@hogranch.com> <24701.1512440707@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox