Re: Typos in the code and README

Daniil Davydov <3danissimo@gmail.com>

From: Daniil Davydov <3danissimo@gmail.com>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, David Rowley <dgrowleyml@gmail.com>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-20T06:11:48Z
Lists: pgsql-hackers
Hi,

On Mon, Apr 20, 2026 at 2:00 AM Alexander Lakhin <exclusion@gmail.com> wrote:
>
> Please look at another set of typos and inconsistencies introduced since
> 2026-01-01

I've found a few other typos. Although they are quite old, I think they should
be mentioned here :

1) Typo in tidstore.c
"Find the shared the shared radix tree" --> "Find the shared radix tree".

2) A bit inconsistent comment in twophase.c
```
/*
 * Recreates a state file. This is used in WAL replay and during
 * checkpoint creation.
 *
 * Note: content and len don't include CRC.
 */
static void
RecreateTwoPhaseFile(FullTransactionId fxid, void *content, int len)
```

This comment was introduced in the implementation of the two-phase commit [1].
At that time, this function was actually used during replaying the
XLOG_XACT_PREPARE record. Commit [2] changed that code, so now this function is
used only during checkpoint and restartpoint creation.

If restartpoint creation can be considered as part of the WAL replay, we can
leave this comment as is. Otherwise, I suggest changing it to something like
this :
/*
 * Recreates a state file. This is used during checkpoint/restartpoint creation.
 *
 * Note: content and len don't include CRC.
 */

Another idea - we can stop listing the places of function's usage so that we
don't need to touch this comment later.

[1] d0a89683a3a4dd8e76ef0a99101355999e519df5
[2] 728bd991c3c4389fb39c45dcb0fe57e4a1dccd71

--
Best regards,
Daniil Davydov



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix typo in planner.c

  2. Fix meson build of snowball code.

  3. Update to latest Snowball sources.

  4. Remove unneeded defines from pg_config.h.in

  5. Fix typos and inconsistencies in code and comments

  6. Fix a few more duplicate words in comments

  7. Fix a few duplicate words in comments

  8. Fix typos and grammar in the code

  9. Fix an assortment of spelling mistakes and typos

  10. Fix inconsistent LWLock tranche name "CommitTsSLRU"

  11. Fix typos in code comments and test data

  12. Fix typos and grammar in code comments and docs

  13. Fix a series of typos and outdated references

  14. Optimize InvalidateAttoptCacheCallback() and TypeCacheTypCallback()

  15. pg_upgrade: Remove unused macro

  16. pgcrypto: Remove unused binary from clean target

  17. Fix an assortment of typos

  18. Fix duplicated consecutive words in comments

  19. Remove unused function prototype

  20. Fix incorrect parameter name in prototype

  21. Fix typos and duplicate words

  22. Speedup 2PC recovery by skipping two phase state files in normal path

  23. Two-phase commit. Original patch by Heikki Linnakangas, with additional