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 1iB1l3-0002Dd-JF for pgsql-general@arkaria.postgresql.org; Thu, 19 Sep 2019 19:06:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iB1l0-0000VI-Rm for pgsql-general@arkaria.postgresql.org; Thu, 19 Sep 2019 19:06:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iB1l0-0000Uu-0W for pgsql-general@lists.postgresql.org; Thu, 19 Sep 2019 19:06:22 +0000 Received: from mail-oln040092010062.outbound.protection.outlook.com ([40.92.10.62] helo=NAM04-CO1-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iB1kw-00042u-EC for pgsql-general@postgresql.org; Thu, 19 Sep 2019 19:06:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oSvJ7XIauTLBuhwh/6Jge7TAj2dtFJvR1o1OEbnsOAnmTSByqBArxiRxPF6Tg265oYxU79tA/MAGOJGZeRT+0uCfh4hbaIXI6Yp48PsUVi90Wk+O6IvvkCb/DyZq22KdEkcjXcyOguoFGdas7mNQIN6Fg937wu9Dddc1ZYzbnE2AW59dmhkz++sakJ1Vf163g6onU1TqU6WuBq/M8eUydlxP+hbyKtgmL8Yx6aikYLtEzG3MwDGSkuhERg5fEkigjrcdnwB7yDdULon1/aaJP+erHo/q2sD7i3qqY6nSLJyhGjlk4dcle4Dfdzk77yqkF5CoV1rcJF1SR6CZTYAFGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sblXQq1Vy80AgHWwspaIlCzUDwA0WTF6Zfgh9V3+8f0=; b=lWv56vw8jzZs/S1o7R+39Nur62ARGoTb4bkF7OgMfTKzXEDdlKKAY9FzOyhkGz12hvqXfEKLFQYG743cMsvh4ybulFGP6n/ISMV2nmgUIRzexIR6vsq3LlN0SwO81/aQcs6agTeGzqEQSw8aLqJAewVP5/3cmB37uFoN9t35Yg2X3BHTPZmCGtHYN2HB3ykZtKjw6JML+NurY26JGgmoxFvO2770boNnJL6+oySOmacxB6QC3+QEOT9POchG5HQ/I1OPnovSYuFShEcQFy321YVT60+/sVn7crkz9dMCkEV5hasuzGYYCRhGmK9h2sICTQk08tkqV8wEXHZQ0tlGQQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sblXQq1Vy80AgHWwspaIlCzUDwA0WTF6Zfgh9V3+8f0=; b=jEwUnYTYUXlaO8zl3G2rsWY8lFxCNsU2ooFkCSMMboVxj8/aGszbUdab5/pMGPVmWpcZWrHKsJ1BkaRSpxyLUD8gPnDgoj1wJmnI55NCtCW7FvHLX7/TLKL4OJmi5/p4QpvGuTml99YdJ7P8ZTDQkqJMOq7yqM9uuopaowalD4wwpZzWBZK9K2k9WSwIsmVFGvvgJdA1QeylbrYSmyQeNBTjRuE0elg7S7kZ9BwTtBReLDGCepahR751rDvXk4HNwTf/TPQYTfyUEdN6qmY4gwbfE+EsJwZLKmX+jBIiMHzV2x0kf3+8ZDueqVxxy3gw75a0dPfdn77M5rFDCd6lgg== Received: from SN1NAM04FT032.eop-NAM04.prod.protection.outlook.com (10.152.88.51) by SN1NAM04HT224.eop-NAM04.prod.protection.outlook.com (10.152.89.228) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2263.14; Thu, 19 Sep 2019 19:06:15 +0000 Received: from BYAPR08MB5014.namprd08.prod.outlook.com (10.152.88.58) by SN1NAM04FT032.mail.protection.outlook.com (10.152.88.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2263.14 via Frontend Transport; Thu, 19 Sep 2019 19:06:15 +0000 Received: from BYAPR08MB5014.namprd08.prod.outlook.com ([fe80::4c58:d3a6:a3d6:2511]) by BYAPR08MB5014.namprd08.prod.outlook.com ([fe80::4c58:d3a6:a3d6:2511%6]) with mapi id 15.20.2284.009; Thu, 19 Sep 2019 19:06:15 +0000 From: Julie Nishimura To: "pgsql-general@lists.postgresql.org" , pgsql-general Subject: is it safe to drop 25 tb schema with cascade option? Thread-Topic: is it safe to drop 25 tb schema with cascade option? Thread-Index: AQHVbxz7RqwyABIHm0SvnaR08xLCUw== Date: Thu, 19 Sep 2019 19:06:15 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:50324488550579E0F7C86FE5524AC5400D591CBCF7D87EA0DE245905D7930DD8;UpperCasedChecksum:1833990F8095E10550184282211E33D37488DA3B174897CB0EB1E9D8C45C3839;SizeAsReceived:6620;Count:40 x-tmn: [e0leMsK7T3CAL6+6lFz/tY6B3r72Ugcn] x-ms-publictraffictype: Email x-incomingheadercount: 40 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(5050001)(7020095)(20181119110)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1601125500)(1603101475)(1701031045);SRVR:SN1NAM04HT224; x-ms-traffictypediagnostic: SN1NAM04HT224: x-microsoft-antispam-message-info: VPNkCnfpS29hPDiX0edtoAbQR8WKpZVHElLmDWkhZzZYFs0oYV/LF4F2OKAdlifI1Kbijlrzo0Nn4d5lg+ynRtpodA6pT+GHtAyPHr8nwM32c/8MEiaV02iSQV8D8YUYD5XXz62uwODy6Gq2npacPdkvVMB5dcb6qSIMKz/Q29lnNSTvzzFywNF6xawtuJEp x-ms-exchange-transport-forked: True Content-Type: multipart/alternative; boundary="_000_BYAPR08MB5014C652EB9FEE28CB407B58AC890BYAPR08MB5014namp_" MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 6c7fb321-7fd8-4b54-c880-08d73d347208 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Sep 2019 19:06:15.6276 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1NAM04HT224 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_BYAPR08MB5014C652EB9FEE28CB407B58AC890BYAPR08MB5014namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, we've recently inherited large Greenplum system (master with standby= and 8 segment nodes), which is running old version of GP: 20190919:15:22:01:122002 gpstate:hitw-mck-gp1-mdw-1:gpadmin-[INFO]:- Gree= nplum initsystem version =3D 4.3.4.0 build 1 20190919:15:22:01:122002 gpstate:hitw-mck-gp1-mdw-1:gpadmin-[INFO]:- Gree= nplum current version =3D PostgreSQL 8.2.15 (Greenplum Database 4.3.8.1 build 1) on x86_64-unknown-linux-gnu, compiled by GCC gcc= (GCC) 4.4.2 compiled on Apr 20 2016 08:08:56 20190919:15:22:01:122002 gpstate:hitw-mck-gp1-mdw-1:gpadmin-[INFO]:- Post= gres version =3D 8.2.15 If I scan logs, for the last 6 months I see the following warning after eve= ry transaction: 04 UTC,0,con9059926,cmd1,seg-1,,,,sx1,"WARNING","01000","database ""my_db_n= ame"" must be vacuumed within 1607900488 transactions",,"To avoid a databas= e shutdown, execute a full-database VACUUM in ""my_db_name"".",,,,"set clie= nt_encoding to 'SQL_ASCII'",0,,"varsup.c",109, The database "my_db_name" is 32 TB. According to the crontab logs, we run V= ACUUM on pg_catalog every day (while the system is online). Should I try to= run VACUUM FULL on pg_catalog first, or I need to run VACUUM on the entire= "my_db_name"? I am not sure what I should try first. For the full picture: the largest schema on "my_db_name" was "temp", it was= consuming about 25 tb. So what we did - we renamed this schema to "temp_or= ig", and created brand new schema "temp" (to make drop objects from temp_or= ig easier and isolated). However, I was hesitating to drop the entire schem= a that big in one transaction, and started dropping tables from "temp_orig"= , however, there are millions of objects in that schema, and as a result, n= umber of "drop table" transactions are very high. How safe is it to run "DR= OP SCHEMA temp_orig CASCADE" if the schema is almost 25 tb? We are running out of space very quickly. we have only 5% left on a device Last time when we dropped millions of objects from that old schema, we were= able to free up some space, but this time around even though I am running = a lot of "drop tables", the space temporarily goes down (according to df -h= ), then it goes back again, even faster than I am freeing it up. Which make= s me believe the system catalog is bloated now. Any advice is appreciated. Thanks a lot! --_000_BYAPR08MB5014C652EB9FEE28CB407B58AC890BYAPR08MB5014namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello, we've recently inherited large Greenplum system (master with st= andby and 8 segment nodes), which is running old version of GP:

20190919:15:22:01:122002 gpstate:hitw-mck-gp1-mdw-1:gpadmin-[INFO]:-&n= bsp;  Greenplum initsystem version   =3D 4.3.4.0 build 1
20190919:15:22:01:122002 gpstate:hitw-mck-gp1-mdw-1:gpadmin-[INFO]:- &= nbsp; Greenplum current version      =3D PostgreSQ= L 8.2.15 (Greenplum
 Database 4.3.8.1 build 1) on x86_64-unknown-linux-gnu, compiled by GC= C gcc (GCC) 4.4.2 compiled on Apr 20 2016 08:08:56
20190919:15:22:01:122002 gpstate:hitw-mck-gp1-mdw-1:gpadmin-[INFO]:- &= nbsp; Postgres version         = ;      =3D 8.2.15

If I scan logs, for the last 6 months I see the following warning afte= r every transaction:
04 UTC,0,con9059926,cmd1,seg-1,,,,sx1,"WARNING","01000&= quot;,"database ""my_db_name"" must be vacuumed wi= thin 1607900488 transactions",,"To avoid a database shutdown, exe= cute a full-database VACUUM in ""my_db_name"".",,,= ,"set client_encoding to 'SQL_ASCII'",0,,"varsup.c",109= ,

The database "my_db_name" is 32 TB. According to the crontab= logs, we run VACUUM on pg_catalog every day (while the system is online). = Should I try to run VACUUM FULL on pg_catalog first, or I need to run VACUU= M on the entire "my_db_name"? I am not sure what I should try first.

For the full picture: the largest schema on "my_db_name" was= "temp", it was consuming about 25 tb. So what we did - we rename= d this schema to "temp_orig", and created brand new schema "= temp" (to make drop objects from temp_orig easier and isolated). Howev= er, I was hesitating to drop the entire schema that big in one transaction, an= d started dropping tables from "temp_orig", however, there are mi= llions of objects in that schema, and as a result, number of "drop tab= le" transactions are very high. How safe is it to run "DROP SCHEMA temp= _orig CASCADE" if the schema is almost 25 tb?

We are running out of space very quickly. we have only 5% left on a de= vice

Last time when we dropped millions of objects from that old schema, we= were able to free up some space, but this time around even though I am run= ning a lot of "drop tables", the space temporarily goes down (acc= ording to df -h), then it goes back again, even faster than I am freeing it up. Which makes me believe the system cat= alog is bloated now.

Any advice is appreciated.

Thanks a lot!

--_000_BYAPR08MB5014C652EB9FEE28CB407B58AC890BYAPR08MB5014namp_--