Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jb2UC-0001ki-Mu for pgsql-general@arkaria.postgresql.org; Tue, 19 May 2020 13:40:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jb2UB-0001DZ-IX for pgsql-general@arkaria.postgresql.org; Tue, 19 May 2020 13:40:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jb2UB-0001DS-AZ for pgsql-general@lists.postgresql.org; Tue, 19 May 2020 13:40:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jb2U9-0004kR-70 for pgsql-general@lists.postgresql.org; Tue, 19 May 2020 13:40:46 +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 04JDehOo027068; Tue, 19 May 2020 09:40:43 -0400 From: Tom Lane To: Tory M Blue cc: "pgsql-generallists.postgresql.org" Subject: Re: Huge tables, trying to delete OID's taking 6+hours per table In-reply-to: References: Comments: In-reply-to Tory M Blue message dated "Tue, 19 May 2020 00:36:44 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27066.1589895643.1@sss.pgh.pa.us> Date: Tue, 19 May 2020 09:40:43 -0400 Message-ID: <27067.1589895643@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tory M Blue writes: > The command i'm using is > ALTER TABLE tablename SET WITHOUT OIDS; > Would a drop column oid be better? Unfortunately, you're kind of stuck. OIDs are not like regular columns (at least before v12) --- they are integrated into the tuple header in a hackish way, and so there's no way to get rid of them without a table rewrite. regards, tom lane