UPSERT_CHECKPOINTS_SQL = '\n INSERT INTO checkpoints (
thread_id,
checkpoint_ns,
checkpoint_id,
parent_checkpoint_id,
checkpoint,
metadata)\n VALUES (%s,
%s,
%s,
%s,
%s,
%s)\n ON CONFLICT (thread_id,
checkpoint_ns,
checkpoint_id
)\n DO UPDATE SET\n checkpoint = EXCLUDED.checkpoint,\n metadata = EXCLUDED.metadata;\n'