#Error with more than 100 collections in payload_locked_documents_rels (PostgreSQL argument limit)

1 messages · Page 1 of 1 (latest)

heady mantle
#

Hi everyone!
I’m running into an issue with the lockedDocuments system.
My project has over 100 collections, and Payload seems to create relations to the payload_locked_documents_rels table for each one — even when I set lockDocuments: false.
This is leading to a PostgreSQL error (likely hitting the 100-parameter function limit).
Has anyone faced this before? Any suggestions on how to prevent these error

ERROR: cannot pass more than 100 arguments to a function
    err: {
      "type": "DatabaseError",
      "message": "cannot pass more than 100 arguments to a function",
      "stack":
          error: cannot pass more than 100 arguments to a function

logs sql


select "payload_locked_documents"."id", "payload_locked_documents"."global_slug", "payload_locked_documents"."updated_at", "payload_locked_documents"."created_at", "payload_locked_documents__rels"."data" as "_rels" from "payload_locked_documents" left join lateral (select coalesce(json_agg(json_build_array("payload_locked_documents__rels"."order", "payload_locked_documents__rels"."path", "payload_locked_documents__rels"."users_id", "payload_locked_documents__rels"."agencies_id", "payload_locked_documents__rels"."territories_id"