Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eM2v9-0006IZ-2V for pgsql-general@arkaria.postgresql.org; Tue, 05 Dec 2017 02:25:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eM2v8-0005PO-Lh for pgsql-general@arkaria.postgresql.org; Tue, 05 Dec 2017 02:25:18 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eM2v8-0005P5-B9 for pgsql-general@lists.postgresql.org; Tue, 05 Dec 2017 02:25:18 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eM2v5-0004G5-W3 for pgsql-general@lists.postgresql.org; Tue, 05 Dec 2017 02:25:17 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id vB52P7I5024702; Mon, 4 Dec 2017 21:25:07 -0500 From: Tom Lane To: John R Pierce cc: pgsql-general@lists.postgresql.org Subject: Re: transaction wrap around In-reply-to: <0e852582-e8a3-20c9-540c-8cfb6fbe4d8e@hogranch.com> References: <0e852582-e8a3-20c9-540c-8cfb6fbe4d8e@hogranch.com> Comments: In-reply-to John R Pierce message dated "Mon, 04 Dec 2017 17:52:33 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24700.1512440707.1@sss.pgh.pa.us> Date: Mon, 04 Dec 2017 21:25:07 -0500 Message-ID: <24701.1512440707@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk John R Pierce 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