Hey @Falco, would truncating the URL in line 120 fix this?
change it to
uri = UrlHelper.relaxed_parse(u.url[0..self.max_url_length])
EDIT: well, on my first attempt, this yielded
Remapping topic_links url
Error: ERROR: duplicate key value violates unique constraint "unique_post_links"
DETAIL: Key (topic_id, post_id, url)=(19484, 61049, https://staging.community.rstudio.com/t/birds-of-a-feather-bof-at-rstudio-conf-2019l/19328) already exists.
The remap has only been partially applied due to the error above. Please re-run the script again.
So short of a database migration to make the URL longer. . . maybe add another rescue on duplicate URLs and let them pass? So also add a
rescue PG::UniqueViolation
that does nothing?