From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: digoal@126.com
Subject: BUG #17127: drop column cann't delete from pg_attribute, so it will up to 1600 limits soon
Date: Thu, 29 Jul 2021 02:35:30 +0000
Message-ID: <17127-f973fb9d41bae9ca@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 17127
Logged by: Zhou Digoal
Email address: digoal@126.com
PostgreSQL version: 14beta2
Operating system: CentOS 7.7 x64
Description:
HI, postgresql drop column cann't delete from pg_attribute, so it will up to
1600 limits soon when add and drop column frequenc.
```
do language plpgsql $$
declare
sql text := 'create table c (';
begin
for i in 1..1600 loop
sql := sql||'c'||i||' int8,';
end loop;
sql := rtrim(sql,',')||')';
execute sql;
end;
$$;
postgres=# alter table c add column c int8;
ERROR: 54011: tables can have at most 1600 columns
LOCATION: ATExecAddColumn, tablecmds.c:6573
postgres=# alter table c drop column c1;
ALTER TABLE
postgres=# alter table c add column c int8;
ERROR: 54011: tables can have at most 1600 columns
LOCATION: ATExecAddColumn, tablecmds.c:6573
postgres=# vacuum full c;
VACUUM
postgres=# alter table c add column c int8;
ERROR: 54011: tables can have at most 1600 columns
LOCATION: ATExecAddColumn, tablecmds.c:6573
postgres=# select attname from pg_attribute where attrelid ='c'::regclass
and attisdropped;
attname
------------------------------
........pg.dropped.1........
(1 row)
```
best regards, digoal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, digoal@126.com
Subject: Re: BUG #17127: drop column cann't delete from pg_attribute, so it will up to 1600 limits soon
In-Reply-To: <17127-f973fb9d41bae9ca@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox