PG directory replayer crashes due to too big row index size
Sentry Issue: SWH-STORAGE-2XDH
ProgramLimitExceeded: index row size 6184 exceeds btree version 4 maximum 2704 for index "directory_entry_file_target_name_perms_idx"
DETAIL: Index row references tuple (258668633,10) in relation "directory_entry_file".
HINT: Values larger than 1/3 of a buffer page cannot be indexed.
Consider a function index of an MD5 hash of the value, or use full text indexing.
CONTEXT: SQL statement "
insert into directory_entry_file (target, name, perms)
select distinct t.target, t.name, t.perms
from tmp_directory_entry_file t
where not exists (
select 1
from directory_entry_file i
where t.target = i.target and t.name = i.name and t.perms = i.perms
)
on conflict
do nothing
;
"
PL/pgSQL function swh_directory_entry_add(directory_entry_type) line 3 at EXECUTE
SQL statement "SELECT swh_directory_entry_add('file')"
PL/pgSQL function swh_directory_add() line 3 at PERFORM
(25 additional frame(s) were not displayed)
...
File "swh", line 10, in <module>
sys.exit(main())