Re: Three commit tips

From: Alexander Lakhin <exclusion(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Three commit tips
Date: 2023-11-03 06:00:00
Message-ID: 27a7998b-d67f-e32a-a28d-e659a2e390c6@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

02.11.2023 18:22, Bruce Momjian wrote:
> Third, I have come up with the following shell script to test for proper
> pgindentation, which I run automatically before commit:

I would also suggest using a script like attached to check a patch for
new unicums (usually some of them are typos or inconsistencies introduced
by the patch).
The script itself can be improved, without a doubt, but it still can be
useful as-is. For example, for a couple of arbitrarily chosen today's
patches [1] it shows:

.../postgresql.git$ check-patch-for-unicums.sh .../v4-0001-Make-all-SLRU-buffer-sizes-configurable.patch
New unicums:
cotents:        ./doc/src/sgml/config.sgml:        Specifies the amount of memory to use to cache the cotents of
====

.../postgresql.git$ check-patch-for-unicums.sh .../v4-0003-Partition-wise-slru-locks.patch
New unicums:
bank_tranche_id: ./src/include/access/slru.h: int bank_tranche_id, SyncRequestHandler sync_handler);
CommitTSSLRU:   ./src/backend/storage/lmgr/lwlock.c: "CommitTSSLRU",
CommitTsSLRULock: ./src/backend/storage/lmgr/lwlocknames.txt:#38 was CommitTsSLRULock
ControlLock:    ./src/backend/replication/slot.c:        * flag while holding the ControlLock as otherwise a concurrent
ctllock:        ./src/backend/access/transam/slru.c: * ctllock: LWLock to use to control access to the shared control
structure.
cur_lru_count:  ./src/backend/access/transam/slru.c:             * Notice that this next line forcibly advances
cur_lru_count to a
...

[1] https://www.postgresql.org/message-id/CAFiTN-uyiUXU__VwJAimZ%2B6jQbm1s4sYi6u4fXBD%3D47xVd%3Dthg%40mail.gmail.com

Best regards,
Alexander

Attachment Content-Type Size
check-patch-for-unicums.sh application/x-shellscript 1.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2023-11-03 06:10:45 Re: Fix a wrong comment in setrefs.c
Previous Message Dilip Kumar 2023-11-03 05:28:43 Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock