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

From David Rowley
Subject Re: BUG #17127: drop column cann't delete from pg_attribute, so it will up to 1600 limits soon
Date
Msg-id CAApHDvqHru4mq22hWYafF-BYYTxYuFKpBJBwC_T5MdG9Sdy2gw@mail.gmail.com
Whole thread Raw
In response to BUG #17127: drop column cann't delete from pg_attribute, so it will up to 1600 limits soon  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
On Thu, 29 Jul 2021 at 15:05, PG Bug reporting form
<noreply@postgresql.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



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17127: drop column cann't delete from pg_attribute, so it will up to 1600 limits soon
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #17127: drop column cann't delete from pg_attribute, so it will up to 1600 limits soon