pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Masahiro Ikeda <ikedamsh@oss.nttdata.com>
To: torikoshia <torikoshia@oss.nttdata.com>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Make --help output fit within 80 columns per line
Date: Wed, 23 Aug 2023 09:45:50 +0900
Message-ID: <c20d4fa43995b3bfbb2c2d06b7ed8731@oss.nttdata.com> (raw)
In-Reply-To: <70043684388c1a8d181cf8f3308ad3ec@oss.nttdata.com>
References: <50ca8ff35a8dd8f9ec89963b503571a7@oss.nttdata.com>
	<3965013067e7b6195132da6c0b80a609@oss.nttdata.com>
	<70043684388c1a8d181cf8f3308ad3ec@oss.nttdata.com>

Hi,

On 2023-08-22 22:57, torikoshia wrote:
> On 2023-08-21 13:08, Masahiro Ikeda wrote:
>> (2)
>> 
>> Is there any reason that only src/bin commands are targeted? I found 
>> that
>> we also need to fix vacuumlo with the above test. I think it's better 
>> to
>> fix it because it's a contrib module.
>> 
>> $ vacuumlo --help | while IFS='' read line; do echo $((`echo $line |
>> wc -m` - 1)) $line; done | sort -n -r  | head -n 2
>> 84   -n, --dry-run             don't remove large objects, just show
>> what would be done
>> 74   -l, --limit=LIMIT         commit after removing each LIMIT large 
>> objects
> 
> This is because I wasn't sure making all --help outputs fit into 80
> columns per line is right thing to do as described below:
> 
> | If this is the way to go, I'll do same things for contrib commands.
> 
> If there are no objection, I'm going to make other commands fit within
> 80 columns per line including (4).

OK. Sorry, I missed the sentence above.
I'd like to hear what others comment too.

>> (3)
>> 
>> Is to delete '/mnt/server' intended?  I though it better to leave it 
>> as
>> is since archive_cleanup_command example uses the absolute path.
>> 
>> -			 "  pg_archivecleanup /mnt/server/archiverdir
>> 000000010000000000000010.00000020.backup\n"));
>> +			 "  pg_archivecleanup archiverdir
>> 000000010000000000000010.00000020.backup\n"));
>> 
>> I will confirmed that the --help text are not changed and only
>> the line breaks are changed.  But, currently the above change
>> break it.
> 
> Yes, it is intended as described in the thread.
> 
> https://www.postgresql.org/message-id/20230615.152036.1556630042388070221.horikyota.ntt%40gmail.com
> 
> | We could shorten it by removing the "/mnt/server" portion, but
> I'm not sure if it's worth doing.
> 
> However, I feel it is acceptable to make an exception and exceed 80
> characters for this line.

Thanks for sharing the thread. I understood.

It seems that the directory name should be consistent with the example
of archive_cleanup_command. However, it does not seem appropriate to
make archive_cleanup_command to use a relative path.

```
> pg_archivecleanup --help
(snip)
e.g.
   archive_cleanup_command = 'pg_archivecleanup /mnt/server/archiverdir 
%r'

Or for use as a standalone archive cleaner:
e.g.
   pg_archivecleanup /mnt/server/archiverdir 
000000010000000000000010.00000020.backup
```

IMHO, is simply breaking the line acceptable?

```
Or for use as a standalone archive cleaner:
e.g.
   pg_archivecleanup /mnt/server/archiverdir
       000000010000000000000010.00000020.backup
```

Regards,
-- 
Masahiro Ikeda
NTT DATA CORPORATION





view thread (15+ messages)  latest in thread

Message-ID: <c20d4fa43995b3bfbb2c2d06b7ed8731@oss.nttdata.com>
Permalink:  ../c20d4fa43995b3bfbb2c2d06b7ed8731@oss.nttdata.com/
Also on:    postgresql.org/message-id/c20d4fa43995b3bfbb2c2d06b7ed8731@oss.nttdata.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: ikedamsh@oss.nttdata.com, torikoshia@oss.nttdata.com
  Subject: Re: Make --help output fit within 80 columns per line
  In-Reply-To: <c20d4fa43995b3bfbb2c2d06b7ed8731@oss.nttdata.com>
  References: <50ca8ff35a8dd8f9ec89963b503571a7@oss.nttdata.com> <3965013067e7b6195132da6c0b80a609@oss.nttdata.com> <70043684388c1a8d181cf8f3308ad3ec@oss.nttdata.com> <c20d4fa43995b3bfbb2c2d06b7ed8731@oss.nttdata.com>

* 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