Thread

  1. RE: [PATCH] Release replication slot on error in SQL-callable slot functions

    Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com> — 2026-05-29T05:36:49Z

    On Friday, May 29, 2026 1:11 PM SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>  wrote:
    > Thanks for the patches, I combined these changes in my latest patch. Please find the v5.
    
    Thanks for updating the patch.
    
    Few comments:
    
    1.
    
    The patch places PG_CATCH() inside create_logical_replication_slot(), but the
    caller may still error out before releasing the slot. It would be better to
    catch the error at the caller level instead. The same problem exists in
    copy_replication_slot(), which does not include the slot persistence logic
    within its CATCH block.
    
    2.
    
    I have a concern about the LWLock handling added within the PG_CATCH block, see [1].
    
    [1] https://www.postgresql.org/message-id/TY4PR01MB17718F04D32E0073F0BC7EC0294082%40TY4PR01MB17718.jpnprd01.prod.outlook.com
    
    Best Regards,
    Hou zj