Open rafatower opened 7 years ago
Here's where it fails: https://github.com/CartoDB/cartodb-postgresql/blob/795d92da8db9f6fcfebdee649e0f32e9c7588403/scripts-available/CDB_CartodbfyTable.sql#L535
The problem is that under the hood it tries to create a b-tree index to check if a column has unique values and it does so on an arbitrary candidate column. PG is hitting some limitation during b-tree index generation.
To reproduce the issue (using this random_string):
tests=# CREATE TABLE index_generation_test AS SELECT random_string(9000)::text AS candidate_id FROM generate_series(1,5);
SELECT 5
tests=# ALTER TABLE index_generation_test ADD CONSTRAINT candidate_id_pk PRIMARY KEY (candidate_id);
ERROR: index row requires 9016 bytes, maximum size is 8191
@rafatower commented on Tue Mar 21 2017
Seen while checking import platform errors:
stack trace: