public inbox for [email protected]help / color / mirror / Atom feed
[PATCH] postgresql.conf.sample comment alignment. 7+ messages / 5 participants [nested] [flat]
* [PATCH] postgresql.conf.sample comment alignment. @ 2022-08-01 23:24 Peter Smith <[email protected]> 0 siblings, 1 reply; 7+ messages in thread From: Peter Smith @ 2022-08-01 23:24 UTC (permalink / raw) To: PostgreSQL Hackers <[email protected]> This patch tweaks a some tabbing and replaces some spaces with tabs to improve slightly the comment alignment in file 'postgresql.conf.sample' PSA. ------ Kind Regards, Peter Smith. Fujitsu Australia Attachments: [application/octet-stream] v1-0001-Align-the-comments.patch (6.0K, ../../CAHut+Ps5MdQ1b4jp9rd63zfE2X25mV58y1W+hm2v53svtGDxBQ@mail.gmail.com/2-v1-0001-Align-the-comments.patch) download | inline diff: From d90b6f327a246d3ed4adf56720350a0e386e9d8a Mon Sep 17 00:00:00 2001 From: Peter Smith <[email protected]> Date: Mon, 1 Aug 2022 17:19:22 +1000 Subject: [PATCH v1] Align the comments. --- src/backend/utils/misc/postgresql.conf.sample | 42 +++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index b4bc06e..141c6cf 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -108,7 +108,7 @@ #ssl_crl_file = '' #ssl_crl_dir = '' #ssl_key_file = 'server.key' -#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers +#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers #ssl_prefer_server_ciphers = on #ssl_ecdh_curve = 'prime256v1' #ssl_min_protocol_version = 'TLSv1.2' @@ -243,9 +243,9 @@ # - Prefetching during recovery - -#recovery_prefetch = try # prefetch pages referenced in the WAL? -#wal_decode_buffer_size = 512kB # lookahead window used for prefetching - # (change requires restart) +#recovery_prefetch = try # prefetch pages referenced in the WAL? +#wal_decode_buffer_size = 512kB # lookahead window used for prefetching + # (change requires restart) # - Archiving - @@ -277,7 +277,7 @@ # Set these only when performing a targeted recovery. #recovery_target = '' # 'immediate' to end recovery as soon as a - # consistent state is reached + # consistent state is reached # (change requires restart) #recovery_target_name = '' # the named restore point to which recovery will proceed # (change requires restart) @@ -287,14 +287,14 @@ # (change requires restart) #recovery_target_lsn = '' # the WAL LSN up to which recovery will proceed # (change requires restart) -#recovery_target_inclusive = on # Specifies whether to stop: +#recovery_target_inclusive = on # Specifies whether to stop: # just after the specified recovery target (on) # just before the recovery target (off) # (change requires restart) #recovery_target_timeline = 'latest' # 'current', 'latest', or timeline ID - # (change requires restart) + # (change requires restart) #recovery_target_action = 'pause' # 'pause', 'promote', 'shutdown' - # (change requires restart) + # (change requires restart) #------------------------------------------------------------------------------ @@ -397,7 +397,7 @@ #cpu_tuple_cost = 0.01 # same scale as above #cpu_index_tuple_cost = 0.005 # same scale as above #cpu_operator_cost = 0.0025 # same scale as above -#parallel_setup_cost = 1000.0 # same scale as above +#parallel_setup_cost = 1000.0 # same scale as above #parallel_tuple_cost = 0.1 # same scale as above #min_parallel_table_scan_size = 8MB #min_parallel_index_scan_size = 512kB @@ -458,7 +458,7 @@ #log_directory = 'log' # directory where log files are written, # can be absolute or relative to PGDATA #log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, - # can include strftime() escapes + # can include strftime() escapes #log_file_mode = 0600 # creation mode for log files, # begin with 0 to use octal notation #log_rotation_age = 1d # Automatic rotation of logfiles will @@ -643,19 +643,19 @@ #autovacuum_vacuum_threshold = 50 # min number of row updates before # vacuum #autovacuum_vacuum_insert_threshold = 1000 # min number of row inserts - # before vacuum; -1 disables insert - # vacuums + # before vacuum; -1 disables insert + # vacuums #autovacuum_analyze_threshold = 50 # min number of row updates before # analyze #autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum #autovacuum_vacuum_insert_scale_factor = 0.2 # fraction of inserts over table - # size before insert vacuum + # size before insert vacuum #autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze #autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum # (change requires restart) #autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age - # before forced vacuum - # (change requires restart) + # before forced vacuum + # (change requires restart) #autovacuum_vacuum_cost_delay = 2ms # default vacuum cost delay for # autovacuum, in milliseconds; # -1 means use vacuum_cost_delay @@ -692,10 +692,10 @@ #default_transaction_read_only = off #default_transaction_deferrable = off #session_replication_role = 'origin' -#statement_timeout = 0 # in milliseconds, 0 is disabled -#lock_timeout = 0 # in milliseconds, 0 is disabled +#statement_timeout = 0 # in milliseconds, 0 is disabled +#lock_timeout = 0 # in milliseconds, 0 is disabled #idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disabled -#idle_session_timeout = 0 # in milliseconds, 0 is disabled +#idle_session_timeout = 0 # in milliseconds, 0 is disabled #vacuum_freeze_table_age = 150000000 #vacuum_freeze_min_age = 50000000 #vacuum_failsafe_age = 1600000000 @@ -712,7 +712,7 @@ #datestyle = 'iso, mdy' #intervalstyle = 'postgres' #timezone = 'GMT' -#timezone_abbreviations = 'Default' # Select the set of available time zone +#timezone_abbreviations = 'Default' # Select the set of available time zone # abbreviations. Currently, there are # Default # Australia (historical usage) @@ -738,7 +738,7 @@ #local_preload_libraries = '' #session_preload_libraries = '' -#shared_preload_libraries = '' # (change requires restart) +#shared_preload_libraries = '' # (change requires restart) #jit_provider = 'llvmjit' # JIT library to use # - Other Defaults - @@ -759,7 +759,7 @@ #max_pred_locks_per_relation = -2 # negative values mean # (max_pred_locks_per_transaction # / -max_pred_locks_per_relation) - 1 -#max_pred_locks_per_page = 2 # min 0 +#max_pred_locks_per_page = 2 # min 0 #------------------------------------------------------------------------------ -- 1.8.3.1 ^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [PATCH] postgresql.conf.sample comment alignment. @ 2022-08-02 00:03 Tom Lane <[email protected]> parent: Peter Smith <[email protected]> 0 siblings, 2 replies; 7+ messages in thread From: Tom Lane @ 2022-08-02 00:03 UTC (permalink / raw) To: Peter Smith <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]> Peter Smith <[email protected]> writes: > This patch tweaks a some tabbing and replaces some spaces with tabs to > improve slightly the comment alignment in file > 'postgresql.conf.sample' Hmm ... the parts you want to change generally look OK to me. I wonder if you are looking at it with tab stops set to 4 spaces rather than 8 spaces? While 4 spaces is our convention for C code, postgresql.conf is going to be edited by end users who almost certainly have their editors set up for 8 spaces, so it's going to look funny to them if the comments are aligned on the assumption of 4 spaces. One idea for avoiding confusion is to legislate that we won't use tabs at all in this file (which we could enforce via .gitattributes, I think). But that might just be making things equally inconvenient for everybody. regards, tom lane ^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [PATCH] postgresql.conf.sample comment alignment. @ 2022-08-02 00:28 Peter Smith <[email protected]> parent: Tom Lane <[email protected]> 1 sibling, 0 replies; 7+ messages in thread From: Peter Smith @ 2022-08-02 00:28 UTC (permalink / raw) To: Tom Lane <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]> On Tue, Aug 2, 2022 at 10:03 AM Tom Lane <[email protected]> wrote: > > Peter Smith <[email protected]> writes: > > This patch tweaks a some tabbing and replaces some spaces with tabs to > > improve slightly the comment alignment in file > > 'postgresql.conf.sample' > > Hmm ... the parts you want to change generally look OK to me. > I wonder if you are looking at it with tab stops set to 4 spaces > rather than 8 spaces? > No. I did fall into that 4/8 trap originally, but I definitely used :set tapstop=8 when modifying this file. > While 4 spaces is our convention for C code, postgresql.conf > is going to be edited by end users who almost certainly have their > editors set up for 8 spaces, so it's going to look funny to them > if the comments are aligned on the assumption of 4 spaces. > > One idea for avoiding confusion is to legislate that we won't > use tabs at all in this file (which we could enforce via > .gitattributes, I think). But that might just be making things > equally inconvenient for everybody. > ------ Kind Regards, Peter Smith Fujitsu Australia ^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [PATCH] postgresql.conf.sample comment alignment. @ 2022-08-03 10:58 Alvaro Herrera <[email protected]> parent: Tom Lane <[email protected]> 1 sibling, 1 reply; 7+ messages in thread From: Alvaro Herrera @ 2022-08-03 10:58 UTC (permalink / raw) To: Tom Lane <[email protected]>; +Cc: Peter Smith <[email protected]>; PostgreSQL Hackers <[email protected]> On 2022-Aug-01, Tom Lane wrote: > One idea for avoiding confusion is to legislate that we won't > use tabs at all in this file (which we could enforce via > .gitattributes, I think). +1. > But that might just be making things equally inconvenient for > everybody. In this situation, the only disadvantaged users are those using a non-fixed-width font in their editor, but those are lost souls already. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Having your biases confirmed independently is how scientific progress is made, and hence made our great society what it is today" (Mary Gardiner) ^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [PATCH] postgresql.conf.sample comment alignment. @ 2022-08-04 01:09 Michael Paquier <[email protected]> parent: Alvaro Herrera <[email protected]> 0 siblings, 2 replies; 7+ messages in thread From: Michael Paquier @ 2022-08-04 01:09 UTC (permalink / raw) To: Alvaro Herrera <[email protected]>; +Cc: Tom Lane <[email protected]>; Peter Smith <[email protected]>; PostgreSQL Hackers <[email protected]> On Wed, Aug 03, 2022 at 12:58:04PM +0200, Alvaro Herrera wrote: > On 2022-Aug-01, Tom Lane wrote: >> One idea for avoiding confusion is to legislate that we won't >> use tabs at all in this file (which we could enforce via >> .gitattributes, I think). > > +1. That's not the first time this 4- or 8-character tab issue is popping up around here, so enforcing spaces and having a rule sounds like a good idea at the end. >> But that might just be making things equally inconvenient for >> everybody. > > In this situation, the only disadvantaged users are those using a > non-fixed-width font in their editor, but those are lost souls already. Haha. -- Michael Attachments: [application/pgp-signature] signature.asc (833B, ../../[email protected]/2-signature.asc) download ^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [PATCH] postgresql.conf.sample comment alignment. @ 2022-08-04 02:19 Julien Rouhaud <[email protected]> parent: Michael Paquier <[email protected]> 1 sibling, 0 replies; 7+ messages in thread From: Julien Rouhaud @ 2022-08-04 02:19 UTC (permalink / raw) To: Michael Paquier <[email protected]>; +Cc: Alvaro Herrera <[email protected]>; Tom Lane <[email protected]>; Peter Smith <[email protected]>; PostgreSQL Hackers <[email protected]> On Thu, Aug 04, 2022 at 10:09:27AM +0900, Michael Paquier wrote: > On Wed, Aug 03, 2022 at 12:58:04PM +0200, Alvaro Herrera wrote: > > On 2022-Aug-01, Tom Lane wrote: > >> One idea for avoiding confusion is to legislate that we won't > >> use tabs at all in this file (which we could enforce via > >> .gitattributes, I think). > > > > +1. > > That's not the first time this 4- or 8-character tab issue is popping > up around here, so enforcing spaces and having a rule sounds like a > good idea at the end. +1 ^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [PATCH] postgresql.conf.sample comment alignment. @ 2022-08-04 02:42 Peter Smith <[email protected]> parent: Michael Paquier <[email protected]> 1 sibling, 0 replies; 7+ messages in thread From: Peter Smith @ 2022-08-04 02:42 UTC (permalink / raw) To: Michael Paquier <[email protected]>; +Cc: Alvaro Herrera <[email protected]>; Tom Lane <[email protected]>; PostgreSQL Hackers <[email protected]> On Thu, Aug 4, 2022 at 11:09 AM Michael Paquier <[email protected]> wrote: > > On Wed, Aug 03, 2022 at 12:58:04PM +0200, Alvaro Herrera wrote: > > On 2022-Aug-01, Tom Lane wrote: > >> One idea for avoiding confusion is to legislate that we won't > >> use tabs at all in this file (which we could enforce via > >> .gitattributes, I think). > > > > +1. > > That's not the first time this 4- or 8-character tab issue is popping > up around here, so enforcing spaces and having a rule sounds like a > good idea at the end. > Well, it was only assumed that I had probably confused 4- 8- tabs, but I don't think I did, so the tabbing issue did not really "pop up" here. e.g. you can see some of the existing alignments I'd suggested modifying here [1] - #shared_preload_libraries = '' # (change requires restart) - #idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disable <- (moved comments of the neighbours to keep them all aligned) - etc. I'm not saying replacing the tabs with spaces isn't a good idea - I also agree probably it is, but that's a different problem to the alignments I was trying to correct with the patch ------ [1] https://github.com/postgres/postgres/blob/master/src/backend/utils/misc/postgresql.conf.sample Kind Regards, Peter Smith. Fujitsu Australia ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2022-08-04 02:42 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-08-01 23:24 [PATCH] postgresql.conf.sample comment alignment. Peter Smith <[email protected]> 2022-08-02 00:03 ` Tom Lane <[email protected]> 2022-08-02 00:28 ` Peter Smith <[email protected]> 2022-08-03 10:58 ` Alvaro Herrera <[email protected]> 2022-08-04 01:09 ` Michael Paquier <[email protected]> 2022-08-04 02:19 ` Julien Rouhaud <[email protected]> 2022-08-04 02:42 ` Peter Smith <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox