[PATCH] Make spelling consistent in waiteventset.c

First seen: 2026-05-06 09:47:52+00:00 · Messages: 1 · Participants: 1

Latest Update

2026-05-08 · opus 4.7

Summary

This is a trivial cosmetic cleanup patch submitted against src/backend/storage/ipc/waiteventset.c. It is not an architecturally significant thread — it contains a single message with no replies in the provided corpus — but it is worth recording because it touches a central piece of PostgreSQL infrastructure (the WaitEventSet abstraction) and illustrates the project's norms around spelling/style consistency.

Technical Context

What waiteventset.c does

WaitEventSet is PostgreSQL's portable abstraction over OS-level readiness notification mechanisms. It was split out of latch.c into its own translation unit (waiteventset.c) relatively recently. The file contains four mutually-exclusive backend implementations selected at build time:

Each of these backends has a structurally parallel block of code that decodes OS-level readiness flags into PostgreSQL's WL_* bitmask. Historically these four blocks were written/edited by different contributors at different times, which is exactly the kind of situation that produces drift in comment wording.

The specific inconsistency

Two of the four backends spelled the readiness direction "writable" in their comments and two spelled it "writeable". Both are valid English, but in a codebase the size of PostgreSQL such drift degrades greppability and makes it marginally harder for reviewers to confirm that the four backends are doing the analogous thing.

The patch normalizes all four occurrences to "writable", matching:

Why the macro name is left alone

The submitter explicitly notes that WL_SOCKET_WRITEABLE is not being renamed. This is the correct call and reflects an understanding of PostgreSQL's API stability conventions:

So the patch deliberately accepts a small residual inconsistency (macro uses "WRITEABLE", comments use "writable") as the lesser evil.

Design Decisions and Tradeoffs

  1. Direction of normalization ("writable" vs "writeable"). Choosing "writable" aligns comments with the majority of existing prose in the file and in PostgreSQL docs, even though it diverges from the macro spelling. The alternative — standardizing comments on "writeable" to match the macro — would have required changing more sites and would have pushed the tree further from standard American technical English.

  2. Scope discipline. The patch is strictly comment-only. It does not:

    • touch the WL_SOCKET_WRITEABLE macro,
    • reflow or re-indent code,
    • attempt to deduplicate the four parallel decode blocks (a real refactor that has been floated occasionally but is out of scope here).

    Keeping the diff minimal maximizes the chance of a committer picking it up as a drive-by cleanup.

  3. No behavioral change, no tests needed. Because only comments are touched, there is no need for regression test updates, no catversion bump, and no backpatch consideration — this is master-only trivia.

Likely Committer Reception

Patches of this shape (comment/spelling normalization in hot, well-known files) are routinely committed by whichever committer is in a housekeeping mood — often Michael Paquier, Tom Lane, or Álvaro Herrera for this kind of janitorial work. Expected review comments, if any, would be limited to:

There is essentially no technical controversy here. The only "tradeoff" worth recording is the asymmetry with the public macro name, and the submitter preemptively addressed it in the cover message.

Broader Significance

While the patch itself is negligible, it is a useful data point about two PostgreSQL engineering norms: