pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: pgsql-hackers@postgresql.org
Subject: postgresql.conf.sample tab width
Date: Fri, 14 Nov 2025 14:13:04 -0600
Message-ID: <aReNUKdMgKxLqmq7@nathan> (raw)

I noticed that GitHub is using 4-space tabs for this file [0], presumably
due to this [1] recent change.  I'm not aware of an official policy for
this file, but it seems to be written for 8-space tabs.

One way to fix this is to set our default tab width to 8 in
.gitattributes/.editorconfig (see attached patch).  AFAICT that doesn't
affect source code files.  We could also add a special rule for
postgresql.conf.sample, or we could even convert it to 4-space tabs.  Any
druthers?

[0] https://github.com/postgres/postgres/blob/master/src/backend/utils/misc/postgresql.conf.sample
[1] https://github.blog/changelog/2025-08-07-default-tab-size-changed-from-eight-to-four/

-- 
nathan

Attachments:

v1-0001-Change-default-tab-width-to-8.patch (text/plain, 1.2K) download From c34c6232589e7d951d447b201fbd97cc8003c826 Mon Sep 17 00:00:00 2001 From: Nathan Bossart <nathan@postgresql.org> Date: Fri, 14 Nov 2025 14:03:55 -0600 Subject: [PATCH v1 1/1] Change default tab width to 8. --- .editorconfig | 2 +- .gitattributes | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index e20d15d4533..5f6493c31b7 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,7 +7,7 @@ indent_size = tab trim_trailing_whitespace = true insert_final_newline = true indent_style = unset -tab_width = unset +tab_width = 8 [*.[chly]] trim_trailing_whitespace = true diff --git a/.gitattributes b/.gitattributes index 4e26bbfb145..58fd4444b58 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,6 @@ # IMPORTANT: After updating this file, also run src/tools/generate_editorconfig.py -* whitespace=space-before-tab,trailing-space +* whitespace=space-before-tab,trailing-space,tabwidth=8 *.[chly] whitespace=space-before-tab,trailing-space,indent-with-non-tab,tabwidth=4 *.cpp whitespace=space-before-tab,trailing-space,indent-with-non-tab,tabwidth=4 *.pl whitespace=space-before-tab,trailing-space,tabwidth=4 -- 2.39.5 (Apple Git-154)

view thread (12+ messages)  latest in thread

Message-ID: <aReNUKdMgKxLqmq7@nathan>
Permalink:  ../aReNUKdMgKxLqmq7@nathan/
Also on:    postgresql.org/message-id/aReNUKdMgKxLqmq7@nathan

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com
  Subject: Re: postgresql.conf.sample tab width
  In-Reply-To: <aReNUKdMgKxLqmq7@nathan>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox