How can I reliably get all changed/updated ways based on an OSC ChangeFile?

crossposted the same problem:

I would attempt using the osmium-getparents command
( “to get parents of objects from an OSM file” ).

“Get objects referencing the objects with the specified IDs from the input and write them to the output. So this will get ways referencing any of the specified node IDs and relations referencing any specified node, way, or relation IDs. Only one level of indirection is resolved, so no relations of relations are found and no relations referencing ways referencing the specified node IDs.” Osmium manual pages – osmium-getparents (1)

And since it only examines one level, I think it needs to be called twice.
Example code:

osmium cat -f opl 004.osc.gz | cut -d' ' -f1 > changes00.id
osmium getparents hungary-latest.osm.pbf --add-self --id-file changes00.id -f opl | cut -d' ' -f1 > changes01.id
osmium getparents hungary-latest.osm.pbf --add-self --id-file changes01.id -f opl | cut -d' ' -f1 > changes02.id

I think this can already be simply imported as CSV into PostgreSQL and merged with existing tables.

Of course, this is just a starting point;
the osmium-getparents can be combined with other ideas.

I also think it’s important to filter out false positive changes.
For example, if someone adds a fixme tag to a node and nothing else changes, I would not bother with it.
However, handling this is slightly more complex.