Delete large project

I have a project with a huge amount of issues (80k+),when deleting it I get:
This project was scheduled for deletion, but failed with the following message: PG::QueryCanceled: ERROR: canceling statement due to statement timeout CONTEXT: SQL statement "DELETE FROM ONLY "public"."issue_links" WHERE $1 OPERATOR(pg_catalog.=) "source_id""

can i delete it manually somehow?

  • Self hosted: [GitLab ] 13.0.5 (9097f912ba5)

Should anyone ever hit this in the future. Via the psql console:

delete from issues where project_id=18 and iid < 10000;

(and then 20000, … )


Thanks for sharing your solution to this problem, @carlokok! :slight_smile:

When the goal is to delete a project anyway, modifying its DB records directly carries few consequences. I just want to leave a note here that this same strategy carries some risk when modifying records that are meant to be kept.

The underlying causes for this PG:: QueryCanceled error are being discussed (and hopefully resolved soon) in our bug tracker.