pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: is it safe to drop 25 tb schema with cascade option?
Date: Thu, 19 Sep 2019 17:37:28 -0500
Message-ID: <38e75ba0-65f1-0455-adc1-c906c3a7c4b6@gmail.com> (raw)
In-Reply-To: <16068.1568930127@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>
	<e5dc9c1a-a180-daa7-fb3b-5bf48920409d@aklaver.com>
	<16068.1568930127@sss.pgh.pa.us>

On 9/19/19 4:55 PM, Tom Lane wrote:
> Adrian Klaver <adrian.klaver@aklaver.com> writes:
>> 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?
> Yes, if there are some small tables that have relfrozenxid even further
> back than the big ones, vacuuming them first would be a win.

With this?

CDSCH02=# select cl.oid,
        COALESCE(ta.schemaname, 'pg_toast'),
        cl.relname,
        cl.relfrozenxid,
        age(cl.relfrozenxid)
from pg_class cl FULL JOIN pg_tables ta
    ON ta.tablename = cl.relname
where not cl.relfrozenxid = xid '0'
order by age(cl.relfrozenxid) desc
;



-- 
Angular momentum makes the world go 'round.





view thread (9+ messages)

Message-ID: <38e75ba0-65f1-0455-adc1-c906c3a7c4b6@gmail.com>
Permalink:  ../38e75ba0-65f1-0455-adc1-c906c3a7c4b6@gmail.com/
Also on:    postgresql.org/message-id/38e75ba0-65f1-0455-adc1-c906c3a7c4b6@gmail.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: ronljohnsonjr@gmail.com
  Subject: Re: is it safe to drop 25 tb schema with cascade option?
  In-Reply-To: <38e75ba0-65f1-0455-adc1-c906c3a7c4b6@gmail.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> <16068.1568930127@sss.pgh.pa.us> <38e75ba0-65f1-0455-adc1-c906c3a7c4b6@gmail.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