Purée tomatoes (with purée from can) in a blender until smooth.
Cook onion in oil in a 4-quart heavy saucepan over moderate heat, stirring, until softened, about 8 minutes. Add puréed tomatoes, tomato paste, brown sugar, vinegar, and salt and simmer, uncovered, stirring occasionally, until very thick, about 1 hour (stir more frequently toward end of cooking to prevent scorching).
Purée ketchup in 2 batches in blender until smooth (use caution when blending hot liquids). Chill, covered, at least 2 hours (for flavors to develop).