On Thu, Jun 11, 2020 at 12:41:17AM +0000, Bossart, Nathan wrote: > I quickly put together a patch to add INDEX_CLEANUP and TRUNCATE to > vacuumdb before noticing a previous thread for it [0]. My take on it > was to just name the options --skip-index-cleanup and --skip-truncate. > While that does not give you a direct mapping to the corresponding > VACUUM options, it simplifies the patch by avoiding the boolean > parameter parsing stuff altogether.
Cannot blame you for that. There is little sense to have a pure mapping with the options here with some custom boolean parsing. What about naming them --no-index-cleanup and --no-truncate instead? I would suggest to track the option values with variables named like do_truncate and do_index_cleanup. That would be similar with what we do with --no-sync for example. -- Michael
signature.asc
Description: PGP signature