Changes between Initial Version and Version 1 of Ticket #36822


Ignore:
Timestamp:
Dec 22, 2025, 3:58:34 PM (14 hours ago)
Author:
Jacob Walls
Comment:

Thanks for the report. The related object aspect (Part 3) is a duplicate of #36248, but I take your point that max_query_params shouldn't be unbounded on Postgres if you're using server-side cursors.

I'll re-scope your ticket to just Parts 1 & 2 of your suggested fix.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36822

    • Property Keywords bulk_batch_size max_query_params added
    • Property Triage Stage UnreviewedAccepted
    • Property Summary Deleting objects with >65535 related rows fails on psycopg3 w/ server side binding enabledImplement parameter limit for Postgres backend with server-side binding enabled
  • Ticket #36822 – Description

    initial v1  
     1[NOTE:] Much of the context of the following report, as well as "Part 3" of the mitigation is a duplicate of #36248, but this ticket was accepted for "Part 1" and "Part 2" below, see triage decision.
     2
     3Original report follows:
     4----
    15When deleting a model instance that has more than 65535 related objects via CASCADE, Django exceeds PostgreSQL's query parameter limit. This causes an {{{OperationalError}}} during the collection phase when Django checks for further related objects.
    26
Back to Top