some database upsert debugging