Shameless plug: check out [Rosettable https://github.com/francoisp/rosettable]. Brings Postgres triggers and notifies to your MySQL schema, with it you can organize a smooth transition. Using MySQL_fdw you can use your current MySQL schema with the above you can know when a client interacted directly with MySQL; all the while you add some nice jsonb and Plpgsql and transition out of MySQL incrementally. Don’t rewrite, write onward