[db-wg] improve --list-sources query to retain history