Hi! I've made a WIP patch that uses 64-bit TOAST value ID instead of 32-bit, and sent it as a part of discussion, but there was no feedback on such a solution. There was a link to that discussion at the top of this thread.
Also, I have to note that, based on our work on Pluggable TOAST - extending TOAST pointer with additional structures would require review of the logical replication engine, currently it is not suitable for any custom TOAST pointers. Currently we have no final solution for problems with logical replication for custom TOAST pointers. -- Regards, Nikita Malakhov Postgres Professional The Russian Postgres Company https://postgrespro.ru/