Skip to content

Panic when the number of replicas is bigger than max_wal_senders #176

Open
@rugwirobaker

Description

@rugwirobaker

When you try to add one replica beyond max_wal_senders it panics on boot.

P2023-03-20T22:09:14Z app[21781770c63089] den [info]Provisioning standby
2023-03-20T22:09:15Z app[21781770c63089] den [info]repmgr -h fdaa:0:c688:a7b:d5a6:6646:f15a:2 -p 5433 -d repmgr -U repmgr -f /data/repmgr.conf standby clone -c -F
2023-03-20T22:09:22Z app[21781770c63089] den [info]panic: failed to clone primary: failed to clone primary: exit status 1
2023-03-20T22:09:22Z app[21781770c63089] den [info]goroutine 1 [running]:
2023-03-20T22:09:22Z app[21781770c63089] den [info]main.panicHandler({0x9a0c40?, 0xc0004303e0})
2023-03-20T22:09:22Z app[21781770c63089] den [info]	/go/src/github.com/fly-examples/fly-postgres/cmd/start/main.go:100 +0x55
2023-03-20T22:09:22Z app[21781770c63089] den [info]main.main()
2023-03-20T22:09:22Z app[21781770c63089] den [info]	/go/src/github.com/fly-examples/fly-postgres/cmd/start/main.go:34 +0xadd

We should handle this gracefully by logging an error or even return one to the user. Perhaps we should even automatically check the max_wal_senders setting and optionally update it before adding the new replica.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions