neon
neon copied to clipboard
Add a safety guard against dupe sk in walproposer config
Steps to reproduce
Start a walproposer with an invalid config (duplicate safekeeper) in postgresql.conf
, like:
neon.safekeepers = 'safekeeper-1.us-east-2.aws.neon.build:6401,safekeeper-3.us-east-2.aws.neon.build:6401,safekeeper-1.us-east-2.aws.neon.build:6401'
This is not a new problem, but I haven't found an existing issue for it.
Expected result
walproposer exits with FATAL error because it detects a duplicate safekeeper in the configuration, data on safekeepers is not modified.
Implementation can compare hostname or nodeId
received in each connection (latter is more safe).
Actual result
Probably everything explodes and corrupts data