Avoid duplicate file references in backend .pot file

Started by Peter Eisentrautabout 2 hours ago1 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

appliessuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t254515
psql -h localhost -U postgres

Built from patchset v1 (message #1), November 02, 2026 at 10:48 AM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t254515_1 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t254515_1 && git checkout t254515_1

Patchset v1 (message #1) is on t254515_1

Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

The list of files for the backend's message catalog is collected with
find, which also lists symlinks, namely the generated files that are
linked from src/include/utils/ to src/backend/utils/ (such as
guc_tables.inc.c) and the port/pg_sema.c and port/pg_shmem.c links
created by configure. Since the link targets are found under their real
names as well, xgettext processed those files twice, resulting in
duplicate "#:" references like

#: ../include/utils/guc_tables.inc.c:410 utils/guc_tables.inc.c:410

This is an old problem, but the introduction of guc_tables.inc.c in PG19
has made it much more noticeable.

I propose the attached patch to fix this by restricting find to regular
files.

Attachments:

t254515_1
0001-Avoid-duplicate-file-references-in-backend-.pot-file.patchtext/plain; charset=UTF-8; name=0001-Avoid-duplicate-file-references-in-backend-.pot-file.patchDownload+1-2