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

From PG Bug reporting form
Subject BUG #17127: drop column cann't delete from pg_attribute, so it will up to 1600 limits soon
Date
Msg-id 17127-f973fb9d41bae9ca@postgresql.org
Whole thread Raw
Responses Re: BUG #17127: drop column cann't delete from pg_attribute, so it will up to 1600 limits soon  (David Rowley <dgrowleyml@gmail.com>)
Re: BUG #17127: drop column cann't delete from pg_attribute, so it will up to 1600 limits soon  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-bugs
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


pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #17126: Server crashes on dropping user while enumerating owned objects that are droppped concurrently
Next
From: David Rowley
Date:
Subject: Re: BUG #17127: drop column cann't delete from pg_attribute, so it will up to 1600 limits soon