Re: BUG #17127: drop column cann't delete from pg_attribute, so it will up to 1600 limits soon

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: digoal(at)126(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17127: drop column cann't delete from pg_attribute, so it will up to 1600 limits soon
Date: 2021-07-29 03:35:04
Message-ID: CAApHDvqHru4mq22hWYafF-BYYTxYuFKpBJBwC_T5MdG9Sdy2gw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, 29 Jul 2021 at 15:05, PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
> HI, postgresql drop column cann't delete from pg_attribute, so it will up to
> 1600 limits soon when add and drop column frequenc.

This is true, but it's not a bug. We just never recycle attnums. To do
that you'd need to manually create another table and do INSERT INTO
new_table SELECT * FROM old_table.

There is a good chance we could do something to get rid of these
during table rewrites such as in VACUUM FULL or CLUSTER, but fixing
that would be classed as a new feature rather than a bug fix.

David

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2021-07-29 04:07:35 Re: BUG #17127: drop column cann't delete from pg_attribute, so it will up to 1600 limits soon
Previous Message PG Bug reporting form 2021-07-29 02:35:30 BUG #17127: drop column cann't delete from pg_attribute, so it will up to 1600 limits soon