Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vDOdQ-008D9N-L7 for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Oct 2025 14:55:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1vDOdP-007yO9-1j for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Oct 2025 14:55:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vDOdO-007yNt-NO for pgsql-hackers@lists.postgresql.org; Mon, 27 Oct 2025 14:55:45 +0000 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vDOdK-004Vlt-1x for pgsql-hackers@lists.postgresql.org; Mon, 27 Oct 2025 14:55:45 +0000 Received: by mail-io1-xd30.google.com with SMTP id ca18e2360f4ac-88703c873d5so166150739f.3 for ; Mon, 27 Oct 2025 07:55:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761576941; x=1762181741; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=iOM/CcNrmm17etRWOnW5t9nP7RFSEHTUXX2MzdtG1tw=; b=Epp6hDXnsh57uMhTLkcl+aeAuSm4ZFlLv8nlcq7Qa+GNFzlVvWTc35yndb+hl8J+ly WIaUldtGcOFI/cjyg7eLAasT/PfXDv7HLc+F2V8Igcy/SjM6NGNSvgZ1XARO+tgsGXuo LsypUE6AaOlKNEuAf5Gh9Ugx9uVbDLXLeVc3kxDFaDywqEIOpVhZn09Lyy0z9enfdme3 cQjgGxtzyjorJLiG4hdiCIX21SZBzaPENnjLsvHwWbbs+tFe6aVwC6FamtxPgrnMXchF ov24HcdcoPy/EHSuJ/ADX5tVOhP4OUgd8GxQKIBVRtGDAUhI5IZO2hZh8iU+JgXTHx/n kkww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761576941; x=1762181741; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=iOM/CcNrmm17etRWOnW5t9nP7RFSEHTUXX2MzdtG1tw=; b=sIOvIFL7d/I8GXn+sqqpp0ZF/gbBJEOiAfUN9WlTVb3t3zB1QpHgW1NH3EHOi+I62r 8zSfBu+/0m0kh6pNp4lO9G7jfBT9PFLvUMljOHucKPze5GkCQkt7vcBXCa/Xptvvg8dE ewUfE2kKxA2gJgyw1cjyUimWnomrtr0pNNv7TRQ/7MvNb57LNUZ0DOa1/1QWy3YZNRuL OT+/PrtJO4muxf0gdFn+l6Ew0y7n71HCRprFsFLqLMj3vL4wsbQOk4KEZ2t0IDJMqMgV vVXA5viqs/F1oh0eOmkO1kJ7yaT5gEpPrCl4xH8Uu1TumUaV7mE13JVK0q8xPuFqrU9Y C5cQ== X-Gm-Message-State: AOJu0Yylra62Lv3ZKW3IfZ7d6pUVCWtrlpwwjAOv34MvcZIwpIytUhZ7 d7hRrW0gWn8LdZYmdbMx7wBZvO6v4A24kvEsy2eN9QVudtEzsPI9Ms0A X-Gm-Gg: ASbGnct7Lhvqp46gaTkT7QzJsKyB1n45HppvInP/+o6kaCJo4hiYnQ1L4Ylq9fJOety FB8pFCo25fnZsoysIJJud6Pk3YBRy07yaTwmzxRzh2lGMraJ86ypKIgXw6+XU0zNhu7lTu37U5e zLbYtxoramlX9gwWDK65mHI6ea/bi5mjXYEJ3L60ZGL+5hwrDSU+eHGOiVHogcyVQPvi2wo0yDt uXQ7qTowMi9Oh0VewD4+flX/MElchRNQHtHZr4qgoC5FD2hLf4ASSPhHM+1XaC178PW0/rxE90k 8XoVUOPV78XoVdB1CEW+A/O96hfm3z5b02Iuwuo/2+KUNkzbFu4Fos6EYtMh/tXNqY6doKl4EuT I4kPV8EdORlU8TnYDiVDoQHuUkvuCtxjWsG8A5oQ5qd8e93EF9OzyiU+ifXYPVCIzWWo0tNYEvO PbqjdBj871APGVTqgUdobAwfvkJSQYaWnSpXsY/EIde9PlKGwFF/q+vQSBDRcUwW+hnw== X-Google-Smtp-Source: AGHT+IHVVkkWS65/Sn4eI6i40YfBz4vaEEzssWy8ZK4fEK0FG8JfHYWT0jLejnok50QK/EFozanB2w== X-Received: by 2002:a05:6e02:1a8e:b0:430:ab21:8c4d with SMTP id e9e14a558f8ab-4320f7bb713mr4884145ab.11.1761576940605; Mon, 27 Oct 2025 07:55:40 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-5aea946ddc5sm3143417173.36.2025.10.27.07.55.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Oct 2025 07:55:40 -0700 (PDT) Date: Mon, 27 Oct 2025 09:55:38 -0500 From: Nathan Bossart To: Aleksander Alekseev Cc: PostgreSQL Hackers , Arseniy Mukhin , Bruce Momjian , Michael Paquier Subject: Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Oct 27, 2025 at 03:13:33PM +0300, Aleksander Alekseev wrote: > OK, here is the corrected patch v5. Thanks. I had to run pgindent twice before it stopped making changes, but the results look pretty good to me. However, I still noticed a few oddities. --- a/contrib/seg/seg.c +++ b/contrib/seg/seg.c @@ -2,9 +2,9 @@ * contrib/seg/seg.c * ****************************************************************************** - This file contains routines that can be bound to a Postgres backend and - called by the backend in the process of processing queries. The calling - format for these routines is dictated by Postgres architecture. + * This file contains routines that can be bound to a Postgres backend and + * called by the backend in the process of processing queries. The calling + * format for these routines is dictated by Postgres architecture. ******************************************************************************/ This one is a little weird, but maybe it's okay... It looks like pgindent retains the spacing (or lack of spacing) in this situation. It's probably not worth the complexity to try to make it smarter here. --- a/src/backend/access/nbtree/nbtsort.c +++ b/src/backend/access/nbtree/nbtsort.c @@ -69,7 +69,7 @@ /* * DISABLE_LEADER_PARTICIPATION disables the leader's participation in * parallel index builds. This may be useful as a debugging aid. -#undef DISABLE_LEADER_PARTICIPATION + *#undef DISABLE_LEADER_PARTICIPATION */ IMHO we should either remove this line or move it out of the comment. AFAICT we ordinarily don't #undef debugging stuff like this, presumably so you can change it with compile flags. In aclcheck.c and analyze.c, The **** and ==== lines are still getting bumped down to a new line. -.* This function just encapsulates the framing rules. + *.* This function just encapsulates the framing rules. This looks like a goof in commit 25a30bb. I'll go fix that one separately. --- a/src/backend/storage/ipc/waiteventset.c +++ b/src/backend/storage/ipc/waiteventset.c @@ -2010,7 +2010,7 @@ ResOwnerReleaseWaitEventSet(Datum res) * NB: be sure to save and restore errno around it. (That's standard practice * in most signal handlers, of course, but we used to omit it in handlers that * only set a flag.) XXX - * + * * This one looks like a goof in commit 393e0d2. It's interesting that pgindent chooses to add an extra * here, though. -- nathan