Hi, Currently, we can copy an invalidated slot using the function 'pg_copy_logical_replication_slot'. As per the suggestion in the thread [1], we should prohibit copying of such slots.
I have created a patch to address the issue. [1]: https://www.postgresql.org/message-id/CAA4eK1Kw%3DvZ2FZ4DdrmOhuxOAL%3D2abaBm8hu_PsVN2Hd6UFP-w%40mail.gmail.com Thanks and Regards, Shlok Kyal
v1-0001-Restrict-copying-of-invalidated-replication-slots.patch
Description: Binary data