process_fts_updates: Only DELETE if rows were processed.

This commit is contained in:
Alex Vandiver
2025-05-16 14:06:15 +00:00
committed by Tim Abbott
parent eeb485f894
commit f2f94d30fe

View File

@@ -86,6 +86,7 @@ def update_fts_columns(conn: psycopg2.extensions.connection) -> int:
(message_id,),
)
ids.append(id)
if ids:
cursor.execute("DELETE FROM fts_update_log WHERE id = ANY(%s)", (ids,))
conn.commit()
return len(ids)