Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fQbfG-0007xm-4E for pgsql-admin@arkaria.postgresql.org; Wed, 06 Jun 2018 16:52:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fQbfE-0002Xp-VK for pgsql-admin@arkaria.postgresql.org; Wed, 06 Jun 2018 16:52:00 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1fQbfE-0002Xf-NL for pgsql-admin@lists.postgresql.org; Wed, 06 Jun 2018 16:52:00 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fQbfC-00079R-2X for pgsql-admin@postgresql.org; Wed, 06 Jun 2018 16:52:00 +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 w56Gpu6N012882; Wed, 6 Jun 2018 12:51:56 -0400 From: Tom Lane To: nunks cc: pgsql-admin Subject: Re: [pgsql-admin] "Soft-hitting" the 1600 column limit In-reply-to: References: Comments: In-reply-to nunks message dated "Wed, 06 Jun 2018 13:39:49 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12880.1528303916.1@sss.pgh.pa.us> Date: Wed, 06 Jun 2018 12:51:56 -0400 Message-ID: <12881.1528303916@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk nunks writes: > I'm trying to support an application in production at work, and for some > obscure reason the developer made it drop and re-create a column > periodically. Not a good idea ... > I know this is a bad practice (to say the least), and I'm telling them to > fix it, but after the 1600th drop/add cycle, PostgreSQL starts giving out > the column limit error: > ERROR: tables can have at most 1600 columns Yup. "Dropping" a column just hides it, doesn't make it disappear. There are a lot of reasons why that's unlikely to change anytime soon. regards, tom lane