Re: run pgindent in CI

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tomas Vondra <tomas(at)vondra(dot)me>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: run pgindent in CI
Date: 2026-11-06 15:13:14
Message-ID: ea9009ff-be07-4f3e-b2e3-fe03f024bec4@dunslane.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2026-11-05 Th 4:47 PM, Tomas Vondra wrote:
>
> On 11/5/26 22:34, Peter Eisentraut wrote:
>> On 05.11.26 21:26, Peter Geoghegan wrote:
>>> On Thu, Nov 5, 2026 at 3:01 PM Peter Eisentraut <peter(at)eisentraut(dot)org>
>>> wrote:
>>>> The above have been done, so here we are back on this.
>>> It takes me about 7 seconds to run pgindent locally, on my fast
>>> workstation. I prefer to run it exactly as koel does, for obvious
>>> reasons.
>>>
>>> Are you sure that this is an appropriate use of CI cycles?
>> Based on my testing, 7 seconds is trivial compared to everything else
>> that is going on in a CI run.  The CompilerWarnings job is regularly
>> faster than all the other jobs.  We have about 5 minutes we can fill
>> with stuff there before it would affect the overall experience, not that
>> I'm proposing to do that.
>>
> +1
>
> pgindent is one of things I regularly forget to run before pushing,
> after some last minute changes and waiting for CI. And then I remember
> one second after pushing. 7s is worth getting rid of that stress.
>
>

I have a bunch of git hooks that do a lot of this checking for me. See
https://github.com/adunstan/pg-git-hooks

The indent piece only tries to indent files changed in the commit, so
it's almost always lightning fast.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2026-11-06 15:13:30 Re: WAL_LOG CREATE DATABASE strategy broken for non-standard page layouts
Previous Message Andrei Lepikhov 2026-11-06 14:59:42 Re: Show 'Rows Removed by Filter' with two fractional digits in EXPLAIN