Problem is that PostgreSQL does not support LIMIT on the DELETE command.

I have no idea why, it seems such an obvious feature for supporting large databases.

Right, I must've forgotten. I know I had it working, but I don't have code at hand right now. I probably worked around it with a CTE or subquery then?

Something like:

    WITH ids AS (
        SELECT id FROM foo
        WHERE ...
        LIMIT 10
    )
    DELETE FROM foo
    USING ids
    WHERE foo.id=ids.id;
Or:

    DELETE FROM foo
    WHERE id IN (SELECT id FROM foo WHERE ... LIMIT 10);