Restrict copying of invalidated replication slots

Shlok Kyal <shlok.kyal.oss@gmail.com>

From: Shlok Kyal <shlok.kyal.oss@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-02-04T09:56:44Z
Lists: pgsql-hackers

Attachments

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

Commits

  1. Restrict copying of invalidated replication slots.

  2. Doc: Fix pg_copy_logical_replication_slot description.