database: a local pg_receivewal makes a standalone PostgreSQL server read as a primary in keel diff #201
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/keel#201
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found in run 2 of the LNPP 19.0-3 release test across BR1 and BR2, 2026-10-16 (keel 0.23.41 in the image). CT 9121 is the etcd witness: an LNPP node with
database.server: {engine: postgresql, role: standalone}and no pair.At the end of the test,
keel diffon the witness exits 14:The witness has one streaming sender, and it is local:
pg_receivewal@17-main.serviceis the WAL archival unit of postgresql-common. It started at the first boot (its unit file says disabled).keel.inspect.dbengines._postgresql_rolereads any row ofpg_stat_replicationas "a replica is streaming from here", so a standalone server reads as a primary. The same unit runs on the pair nodes (on the standby it restarts in a loop).In run 1 (same spec, keel 0.23.39) the witness gave
keel diffexit 0, so the result depends on whether the unit streams at that moment.Expected, one of: keel does not count a sender from the local host (no
client_addr) or the slotpg_receivewal_serviceas a replica; or the image does not start the archival unit where keel converges the role.The bridge mirrored this item to GitHub: https://github.com/Keel-Linux/keel/issues/171
Comments, labels and the open or closed state sync both ways.
The image side is fixed by Keel-Linux/keel-lnpp#4 (LNPP 19.0-4): a preset disables pg_receivewal@ and pg_compresswal@, and the build fails without it. Run 3 of the release test showed the unit disabled and inactive on the 3 CTs, and keel diff exit 0 on the witness. Left open for keel, which still reads any local sender as a replica, and for pg_dump@17-main.timer, which the first boot presets also enable (a weekly dump into /var/backups).
Fixed in keel 0.23.42 (keel#203): the role query counts only the senders with a client address. The image side is the preset of keel-lnpp#4. LNPP 19.0-5 shows no drift on all 3 nodes.