Skip to content

Make wal_receiver_timeout configurable per subscription #175

@grantzhou

Description

@grantzhou

--- As of 2026-02-13T23:37:07.000Z ---

The discussion focuses on a patch that adds a new subscription option to override the GUC wal_receiver_timeout for individual subscription apply workers. Chao Li reviewed the patch and found it solid, with the new option working as expected in testing. The main technical debate centers on input validation methods. Chao Li initially suggested using atoi() instead of parse_int() for detecting the special value "-1", arguing it would be simpler since parse_int() with flag 0 rejects values with units. However, Fujii Masao defended using parse_int() because atoi() would incorrectly accept invalid inputs like "-1invalid" as valid -1 values. Similarly, for whitespace handling like "-1 ", Fujii Masao argued parse_int() provides better input validation than strcmp(). Japin Li also contributed by identifying a typo. Chao Li ultimately accepted Fujii Masao's reasoning about proper input validation, though suggested enhancing comments to clarify the validation logic.

讨论的焦点是一个补丁,该补丁添加了新的订阅选项来为单个订阅应用工作进程覆盖GUC wal_receiver_timeout。Chao Li审查了补丁,发现它很稳固,新选项在测试中按预期工作。主要的技术争论集中在输入验证方法上。Chao Li最初建议使用atoi()而不是parse_int()来检测特殊值"-1",认为这会更简单,因为带有标志0的parse_int()会拒绝带单位的值。然而,Fujii Masao为使用parse_int()进行了辩护,因为atoi()会错误地将像"-1invalid"这样的无效输入接受为有效的-1值。同样,对于像"-1 "这样的空格处理,Fujii Masao认为parse_int()比strcmp()提供更好的输入验证。Japin Li也通过识别一个拼写错误做出了贡献。Chao Li最终接受了Fujii Masao关于正确输入验证的推理,尽管建议增强注释以澄清验证逻辑。

participants - 参与者:

Metadata

Metadata

Assignees

No one assigned

    Labels

    hacker discussionshacker discussions summarized by PGNexus Agent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions