documentation: Add comment to disable parallel gather for DISTINCT ON query to prevent OOM issues in large VOD libraries.

This commit is contained in:
SergeantPanda 2026-06-25 11:06:35 -05:00
parent b7ee17ffba
commit 78d1f70eda

View file

@ -968,8 +968,10 @@ def _xc_fetch_priority_distinct_relations(
.values('pk')
)
with transaction.atomic():
# Optional: disable parallel gather for this DISTINCT ON query if Docker
# /dev/shm pressure causes worker OOM on very large VOD libraries.
#with connection.cursor() as cursor:
#cursor.execute("SET LOCAL max_parallel_workers_per_gather = 0")
# cursor.execute("SET LOCAL max_parallel_workers_per_gather = 0")
winning_ids = list(winning_ids_qs.values_list('pk', flat=True))
if not winning_ids:
return []