Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iB53P-0002Qv-1i for pgsql-general@arkaria.postgresql.org; Thu, 19 Sep 2019 22:37:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iB53N-0007pM-VL for pgsql-general@arkaria.postgresql.org; Thu, 19 Sep 2019 22:37:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iB53N-0007pB-GF for pgsql-general@lists.postgresql.org; Thu, 19 Sep 2019 22:37:33 +0000 Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iB53L-0002Ob-DH for pgsql-general@lists.postgresql.org; Thu, 19 Sep 2019 22:37:32 +0000 Received: by mail-oi1-x22f.google.com with SMTP id 83so151579oii.1 for ; Thu, 19 Sep 2019 15:37:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=pZwiUAxnl+s6xtubuLyqD100EWxZu1Aa5bJUdXUUqOk=; b=L0NbS8Mbtva6+X6LXfm4CKMFHsMb4fhltsJYEqgTaO8a03D4k+tRqQ/XXvl/zKh+DL +rmN9cDvblvhrxAYekCsSnAyVFg309jy6aWHCUOsJrMbcY1NU7lEcwqj6LcFq/0Riz9F o+OS9pW/5SHmWflpY67ujNdQKIyyPd+w6xzM6vb7s7q1gH18Xko1HZ4UVv5J7pBfVqYT MFg1Geg62c0/+MyVrrvzLjLqnSTfnxqJ0EmqVArovBVE+hLrnw8y1JzlcUJZktCk/fdR WCBy+aVFZ2NFGp7xz+PbGJmF4ttlJvUxmceQeqddW21mqs/zXLAcoNss5AKT637WZHbO prPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=pZwiUAxnl+s6xtubuLyqD100EWxZu1Aa5bJUdXUUqOk=; b=WCcOKuV4VelBuV0oy9kG1jZW70aWt0aX/PKyvPh0FjXlNWwQkINIkyO/1NLjBNmiq/ orl8wEjtVdXyGJbZPnU8fDq85WIRLb2P1clDZ5mgObNxKpJmfH0elHtsv9/8U6nGN7em aapWp+aFrjoC11y4toaDCDvR6vshsFYhAA2P92wO/J+RjhSafmqVdJ5MF+k+1jdXUIpR cvPvaNahWwDVHDZqjVVB/sY7umvTtKQ8C8vs4Vcs2XKxPxGuPe0yJASPweR3XKm0OcTc gfneNs3glD8hKZDhbdNjZxfA/xUog8JFcaFHHdfQqPy6phEYR3SqrzAvdpI+U4TWHGW5 1zIw== X-Gm-Message-State: APjAAAWk7K5nEacD5ySKVK0LElc4Rwkzm+X1vN6TWfWXrlJbrk1RRqOi pJCDoncP4WBHWAYDFDWKsZBgTMbo8xc= X-Google-Smtp-Source: APXvYqzr02OU2Cy+2+Y1svuZBcYSvPt1ZmMn59Hk00clcXdXhEPX6Up8OKdUpYXFx7NJPCmbKWpvfQ== X-Received: by 2002:aca:4942:: with SMTP id w63mr222100oia.129.1568932650346; Thu, 19 Sep 2019 15:37:30 -0700 (PDT) Received: from [192.168.1.10] (ip70-186-126-197.no.no.cox.net. [70.186.126.197]) by smtp.googlemail.com with ESMTPSA id l4sm74018otj.64.2019.09.19.15.37.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Sep 2019 15:37:29 -0700 (PDT) Subject: Re: is it safe to drop 25 tb schema with cascade option? To: pgsql-general@lists.postgresql.org References: <71b7be3f-6f7f-cce4-ce76-87febd8295b0@aklaver.com> <15554.1568929375@sss.pgh.pa.us> <16068.1568930127@sss.pgh.pa.us> From: Ron Message-ID: <38e75ba0-65f1-0455-adc1-c906c3a7c4b6@gmail.com> Date: Thu, 19 Sep 2019 17:37:28 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <16068.1568930127@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 9/19/19 4:55 PM, Tom Lane wrote: > Adrian Klaver 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.