Add a mass upsert capability for collections. Might need to spring for some temp tables or other madness to make it perform. However first cut could be PostgreSQL >= 9.5 specific (https://wiki.postgresql.org/wiki/What's_new_in_PostgreSQL_9.5#INSERT_..._ON_CONFLICT_DO_NOTHING.2FUPDATE_.28.22UPSERT.22.29) and use a prepared batch statement (https://gist.github.com/dvarrazzo/3797445)?