pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Julie Nishimura <juliezain@hotmail.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: is it safe to drop 25 tb schema with cascade option?
Date: Thu, 19 Sep 2019 14:49:48 -0700
Message-ID: <e5dc9c1a-a180-daa7-fb3b-5bf48920409d@aklaver.com> (raw)
In-Reply-To: <15554.1568929375@sss.pgh.pa.us>
References: <BYAPR08MB5014C652EB9FEE28CB407B58AC890@BYAPR08MB5014.namprd08.prod.outlook.com>
	<71b7be3f-6f7f-cce4-ce76-87febd8295b0@aklaver.com>
	<BYAPR08MB5014775B6DA5A7785D052B3FAC890@BYAPR08MB5014.namprd08.prod.outlook.com>
	<b9d21625-6f45-da7e-e3e3-01771c069941@aklaver.com>
	<BYAPR08MB5014807E8AF95524A6A4F439AC890@BYAPR08MB5014.namprd08.prod.outlook.com>
	<d11cac74-fc57-6949-dfc5-cc50d0c0810d@aklaver.com>
	<15554.1568929375@sss.pgh.pa.us>

On 9/19/19 2:42 PM, Tom Lane wrote:
> Adrian Klaver <adrian.klaver@aklaver.com> writes:
>> On 9/19/19 2:24 PM, Julie Nishimura wrote:
>>> Or you meant we need to run vacuum on 'my_db_name' without parameters,
>>> that it runs for every table? I am just not sure how long it will take
>>> to run for 39 tb...:(
> 
>> Not sure. The bottom line is you are running out of transaction ids and
>> if the txid counter wraps things get ugly. You could try vacuuming
>> individual non-system tables that have a lot of churn(UPDATES/DELETES)
>> and see if that buys you some ids.
> 
> You're going to have to vacuum *all* of them to get the global freeze
> counter to advance, as it's basically just the min of the per-table
> pg_class.relfrozenxid values.  It might be worth looking at
> age(relfrozenxid) to see which tables are furthest back, as those
> are the one(s) holding things up; but if you've not been running
> autovacuum then it's likely that they are all old.

So this is the part I need some clarification on. If you start vacuuming 
the tables that are setting the min then that should buy you some time?

> 
> Do NOT NOT NOT use VACUUM FULL here.  It will not make things any
> better than a plain VACUUM, and it will take a lot longer ... time
> you maybe haven't got.
> 
> 			regards, tom lane
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (9+ messages)  latest in thread

Message-ID: <e5dc9c1a-a180-daa7-fb3b-5bf48920409d@aklaver.com>
Permalink:  ../e5dc9c1a-a180-daa7-fb3b-5bf48920409d@aklaver.com/
Also on:    postgresql.org/message-id/e5dc9c1a-a180-daa7-fb3b-5bf48920409d@aklaver.com

 · 

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: adrian.klaver@aklaver.com, tgl@sss.pgh.pa.us, juliezain@hotmail.com
  Subject: Re: is it safe to drop 25 tb schema with cascade option?
  In-Reply-To: <e5dc9c1a-a180-daa7-fb3b-5bf48920409d@aklaver.com>
  References: <BYAPR08MB5014C652EB9FEE28CB407B58AC890@BYAPR08MB5014.namprd08.prod.outlook.com> <71b7be3f-6f7f-cce4-ce76-87febd8295b0@aklaver.com> <BYAPR08MB5014775B6DA5A7785D052B3FAC890@BYAPR08MB5014.namprd08.prod.outlook.com> <b9d21625-6f45-da7e-e3e3-01771c069941@aklaver.com> <BYAPR08MB5014807E8AF95524A6A4F439AC890@BYAPR08MB5014.namprd08.prod.outlook.com> <d11cac74-fc57-6949-dfc5-cc50d0c0810d@aklaver.com> <15554.1568929375@sss.pgh.pa.us> <e5dc9c1a-a180-daa7-fb3b-5bf48920409d@aklaver.com>

* 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