The difference is that here we want to do the following during each update cycle:
Get lists of all nodes, ways, relations from osm change file
Get matching old geometry from osmx db for each node, way, relation in osm change file
Generate a datastructure that contains the new osm object alongside the old osm object geometry -- we'll extend this later to pull in the old osm object tags/metadata from postgres
Write new osm geometry to osmx (the update call linked above has a "commit" flag which if not provided aborts the transaction, acting as a dry run)
The code we need to write here is very similar to what's already available in osmexpress to update an osmx db with osm change files: https://github.com/protomaps/OSMExpress/blob/master/src/update.cpp
The difference is that here we want to do the following during each update cycle: