I set up a simple command line script to sync DAP tables with our postgres database using the example code here: https://developerdocs.instructure.com/services/dap/lib-index/lib-examples.
However, certain tables (like courses) get stuck on an upsert and the process hangs until I kill it. Other tables sync just fine.
My code is attached, here's a snippet from the final line of the logs:
{"level": "DEBUG", "message": "upsert 1743 rows into \"canvas\".\"courses\"", "timestamp": "2025-10-30T17:06:49Z", "logger_name": "pysqlsync", "filename": "base.py", "module": "base", "lineno": 1032, "funcName": "upsert_rows", "dap_namespace": null, "dap_table": null,
I'm hesitant to provide the full log for fear of there being sensitive information, but can if it will help.
Has anyone else experienced behavior like this or found a solution? I could always drop and re-initialize the tables, as that works without issue, but is not an ideal solution.