Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pLzDG-00050a-3l for pgsql-hackers@arkaria.postgresql.org; Sun, 29 Jan 2023 04:22:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pLzDE-0004o1-Ie for pgsql-hackers@arkaria.postgresql.org; Sun, 29 Jan 2023 04:22:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pLzDE-0004lg-8r for pgsql-hackers@lists.postgresql.org; Sun, 29 Jan 2023 04:22:40 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pLzD9-0004RG-KS for pgsql-hackers@postgresql.org; Sun, 29 Jan 2023 04:22:39 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 30T4MJ4Y4192136; Sat, 28 Jan 2023 23:22:19 -0500 From: Tom Lane To: Noah Misch cc: Bruce Momjian , Jelte Fennema , Andres Freund , Peter Geoghegan , Magnus Hagander , Alvaro Herrera , Stephen Frost , Jesse Zhang , PostgreSQL-development Subject: Re: run pgindent on a regular basis / scripted manner In-reply-to: <20230129010603.GA1677550@rfd.leadboat.com> References: <20230123001518.6hxyiczhn4kadvmf@awork3.anarazel.de> <1502504.1674433722@sss.pgh.pa.us> <20230123011002.fzcaa3krql3mqsfn@awork3.anarazel.de> <1509591.1674437376@sss.pgh.pa.us> <1608158.1674486546@sss.pgh.pa.us> <20230123173136.knn77pbuakhvjfgk@awork3.anarazel.de> <2238493.1674572097@sss.pgh.pa.us> <20230129010603.GA1677550@rfd.leadboat.com> Comments: In-reply-to Noah Misch message dated "Sat, 28 Jan 2023 17:06:03 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4192134.1674966139.1@sss.pgh.pa.us> Date: Sat, 28 Jan 2023 23:22:19 -0500 Message-ID: <4192135.1674966139@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Noah Misch writes: > Yes, a hook intended to enforce pgindent cleanliness should run tree-wide > pgindent when the given commit(s) change the typedef list. typedef list > changes essentially become another kind of refactoring that can yield merge > conflicts. If your commit passed the pgindent check, rebasing it onto a new > typedefs list may require further indentation changes. New typedefs don't > tend to change a lot of old code, so I would expect this sort of conflict to > be minor, compared to all the other sources of conflicts. In fact, if a typedef addition *does* affect a lot of old code, that's a good sign that the choice of typedef name ought to be rethought: it's evidently conflicting with existing names. I'm not sure what that observation implies for our standard practices here. But it does suggest that "let pgindent do what it wants without human oversight" probably isn't a good plan. We've seen that to be true for other reasons as well, notably that it can destroy the readability of carefully-laid-out comments. regards, tom lane