Thanks. I had a general idea via your description and I'd like to know more about the use case. Please share it if you are ok with that.
I am more than happy to share. The Rust program is pushed to my git repo and path : https://github.com/jobinau/pgscripts/tree/main/patroni/connection/waitforlsn There is a "repro" subdirectory with a file with instructions : REPRODUCE_WITH_WAITFORLSN.md please follow that for quick reproduction. Basically the program has a function `normalize_insert_lsn`which implements the client side fix. But passing a parameter `--raw-insert-lsn` to the program disables this client side manipulation.