From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | "Day, David" <dday(at)redcom(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: unexpected error " tables can have at most 1600 columns" |
Date: | 2015-04-13 16:05:48 |
Message-ID: | CAFj8pRAc1HX2PK4HApXifBKvhVCLnqKyAAdXPhwPd=QpeR1Wyg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2015-04-13 17:57 GMT+02:00 Day, David <dday(at)redcom(dot)com>:
> Situation
>
>
>
> I have a co-developer installing a new Virtual Machine and encountering a
> postgres error during the installation.
>
> One of our SQL patch files is failing unexpectedly.
>
>
>
> The patch is attempting to add columns to a table, The table involved
> currently has only 2 columns,
>
> Interactively I can generate the same error in his current state.
>
>
>
> psql -h ohio -U redcom ace_db
>
> psql (9.3.6)
>
> Type "help" for help.
>
>
>
> ace_db=# select * from log.conference_history;
>
> conf_id | max_size
>
> ---------+----------
>
> (0 rows)
>
>
>
> ace_db=# ALTER TABLE log.conference_history ADD talker_limit integer
> DEFAULT 0;
>
> ERROR: tables can have at most 1600 columns
>
> ace_db=#
>
> ace_db=#
>
There can be removed (invisible columns)
select attname from pg_attribute where attrelid = 'test'::regclass and
attnum > 0;
postgres=# select attname from pg_attribute where attrelid =
'test'::regclass and attnum > 0;
┌─────────┐
│ attname │
╞═════════╡
│ a │
│ c │
│ d │
└─────────┘
(3 rows)
alter table test drop column a, drop column c;
postgres=# select attname from pg_attribute where attrelid =
'test'::regclass and attnum > 0;
┌──────────────────────────────┐
│ attname │
╞══════════════════════════════╡
│ ........pg.dropped.1........ │
│ ........pg.dropped.2........ │
│ d │
└──────────────────────────────┘
(3 rows)
postgres=# select count(*) from pg_attribute where attrelid =
'test'::regclass and attnum > 0 and attisdropped;
┌───────┐
│ count │
╞═══════╡
│ 2 │
└───────┘
(1 row)
So maybe it can be a reason of this issue?
Pavel
>
>
>
>
>
>
> Puzzled ?
>
>
>
>
>
> Any thoughts ?
>
>
>
>
>
> Regards
>
>
>
>
>
> Dave Day
>
From | Date | Subject | |
---|---|---|---|
Next Message | Ilya Ashchepkov | 2015-04-13 16:42:03 | Re: Hot standby problems: consistent state not reached, no connection to master server. |
Previous Message | Day, David | 2015-04-13 15:57:57 | unexpected error " tables can have at most 1600 columns" |