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
>From c34c6232589e7d951d447b201fbd97cc8003c826 Mon Sep 17 00:00:00 2001
From: Nathan Bossart <[email protected]>
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)

Reply via email to