feat(gc): use statement-level trigger for tracking deleted layers
This MR is the corrective action 3/3 for #732 (closed), as described in this thread.
It was preceded by !1103 (merged), where we updated the gc_track_deleted_layers
database function to support both statement-level (what we want to use with this MR) and row-level 9what we currently use) trigger calls. This MR now updates the gc_track_deleted_layers_trigger
so that it uses a statement-level execution.
This is a WIP as we're still unsure how to roll this out safely, given that we'll have to replace the trigger across all 64 layers
partitions plus the parent table.
Related to #732 (closed).
Edited by João Pereira