|
|
Subscribe / Log in / New account

Program names and "pollution"

By Jake Edge
April 2, 2019

A Linux user's $PATH likely contains well over a thousand different commands that were installed by various packages. It's not immediately obvious which package is responsible for a command with a generic name, like createuser. There are ways to figure it out, of course, but perhaps it would make sense for packages like PostgreSQL, which is responsible for createuser, to give their commands names that are less generic—and more easily disambiguated—such as pg_createuser. But renaming commands down the road has "backward compatibility problems" written all over it, as a recent discussion on the pgsql-hackers mailing list shows.

Someone with the unlikely name of "Fred .Flintstone" started things off with a post complaining that PostgreSQL "pollutes the file system" with generic program names. The post suggested that names either be prefixed with "pg_" or that they become subcommands of a wrapper command, à la Git: postgresql createuser. It is not the first time that the topic has been raised, Andreas Karlsson pointed to this thread from 2008; Tom Lane reached further back and pointed to a discussion in 1999.

At issue are a handful of commands that come with PostgreSQL and are potential sources of confusion for users: createdb, dropuser, vacuumdb, and so on. As Lane pointed out, though, the outcomes from the previous discussions make it pretty clear what will probably happen this time as well:

If we didn't pull the trigger twenty years ago, nor ten years ago, we're not likely to do so now. Yeah, it's a mess and we'd certainly do it differently if we were starting from scratch, but we're not starting from scratch. There are decades worth of scripts out there that know these program names, most of them not under our control.

One command that was not mentioned in the early going, perhaps because it is so widely used in scripts, is initdb. Julien Rouhaud thought its name was more confusing than some of the others that had been mentioned, but Lane disagreed:

Meh. The ones with "db" in the name don't strike me as mortal sins; even if you don't recognize them as referring to a "database", you're not likely to guess wrongly that you know what they do. The two that seem the worst to me are createuser and dropuser, which not only have no visible connection to "postgres" or "database" but could easily be mistaken for utilities for managing operating-system accounts.

That led Alvaro Herrera to suggest making symbolic links from pg_* to, at least, createuser and dropuser. That would cause no change but, at some point, a deprecation warning could be printed for the unadorned versions and, eventually, they could perhaps be dropped entirely. But Tomas Vondra wondered what problem was truly being solved:

Can someone describe a scenario where this (name of the binary not clearly indicating it's related postgres) causes issues in practice? On my system, there are ~1400 binaries in /usr/bin, and for the vast majority of them it's rather unclear where do they come from.

He went on to note that there are multiple ways for users to figure out what some random binary does, including man, -h or --help flags, or asking the package manager. Most seem to agree that some of the names are too generic (createuser and dropuser in particular), but there are not likely to be name conflicts with other tools since PostgreSQL has 20+ years of seniority at this point. Even though there is support for some kind of rename, doing so will cause pain—and not for the PostgreSQL project. As Lane put it:

The whole thing is unfortunate, without a doubt, but it's still unclear that renaming those programs will buy anything that's worth the conversion costs. I'd be happy to pay said costs if it were all falling to this project to do so ... but most of the pain will be borne by other people.

A suggestion from Chris Travers that perhaps createuser and dropuser should just be removed led to concerns that leaving it to users to write their own shell scripts might result in security problems. The psql command can be used to create users, but the way to do so is somewhat non-obvious—more obvious alternatives could lead to SQL injection holes. But Lane wondered what the overarching plan is; will createuser actually be removed at some point, especially given that the postmaster command has been deprecated for more than 12 years but still has not been removed? Peter Eisentraut agreed that deprecation was not the project's strong suit, so: "How about we compromise in this thread and remove postmaster and leave everything else as is. ;-)"

Herrera argued that clearing up the confusion should be done as a service to future users. "The implicit argument here is that existing users are a larger population than future users. I, for one, don't believe that." Some seem to think that simply adding symbolic links for the pg_* variants might help things down the road, however. Herrera suggested adding the links and leaving it for a fictional future AI to do the deprecation. David Steele concurred with that plan: "+1 to tasking Skynet with removing deprecated features. Seems like it would save a lot of arguing."

Jokes aside, it doesn't really seem like the idea is going any further than it did in 2008 or 1999. As Lane repeatedly said, if the project were starting from scratch, surely other choices would be made; at this point, though, there is two decades of precedent, scripts, and muscle memory to overcome. That sentiment likely affects plenty of other projects, especially those that have been around for many years—free software grew up in a much smaller pool.

For the future, though, we will probably see less of these kinds of problems. New projects are generally thinking about "pollution" and finding ways to make it clear which binaries go with a particular package/project. That is a good thing since the number of packages we install is only going to grow.



to post comments

Program names and "pollution"

Posted Apr 2, 2019 20:16 UTC (Tue) by mrshiny (guest, #4266) [Link] (18 responses)

"It's broken and obviously a bad idea but we've been doing it for so long we shouldn't attempt to fix it"

Program names and "pollution"

Posted Apr 2, 2019 20:26 UTC (Tue) by ntnn (guest, #109693) [Link] (1 responses)

Yeah, that was my first thought as well.

Also it's not hard to rename commands. Rename them in one major version, provide the old ones as symbolic links and display warnings when they're called by their old names that they're going to be unavailable in the next version.
Once that one rolls around remove the symlinks and you're done.

Will it break some scripts somewhere? Yeah. But then it's the fault of the admins running it for upgrading a major version without checking the changelog.

Program names and "pollution"

Posted Apr 2, 2019 20:29 UTC (Tue) by ntnn (guest, #109693) [Link]

Hadn't finished reading the article before I got to the mention that Alvaro Herrera suggested to do exactly that.

Program names and "pollution"

Posted Apr 3, 2019 8:18 UTC (Wed) by kandreas (guest, #131050) [Link] (9 responses)

The PostgreSQL project is fine with doing the work. The concern is that we will break tons of end users' scripts and pissing them off. I am one of those arguing in favor of fixing this but I know fixing it will break a ton of third party tools and in house scripts at various companies when we in 3-5 years time pull the plug and remove the legacy aliases. Even with a long deprecation cycle with warnings some people will not update their scripts.

Program names and "pollution"

Posted Apr 3, 2019 10:15 UTC (Wed) by lamawithonel (subscriber, #86149) [Link] (4 responses)

Maybe you need more phases than only Deprecation and Removal. The following would be a lot more work, no doubt, but it would give users a lot more options and opportunity to fix things.

1: Move existing commands to pg_* and create symlinks.
1a: (optional) Create a central binary with sub-commands, à la `git` or `systemctl`, and move all the pg_* commands under that. Replace symlinks with shim binaries.
2: Start printing a warning if commands are called by their legacy names, but allowi users to silence the warnings with an option flag.
3: Create a build path to build only the symlinks/shims, and a non-default way to build without them. This gives packagers an easy way to package them separately, and users a way to test without them. It also gives packagers some control over how and when they remove the symlinks/shims.
4: Make deprecation warning silence flags NOOP.
5: Inspired by rfunk's comment, move the symlinks/shims out of $PATH, to something like /usr/share/postgres/bin, and declare them unsupported. Inform users that they can add the new directory to their $PATH if they really need them for some reason, but that you won't accept bug reports against them. Maintain this for at least another major release, possibly several more.
6: Rejoice when our AI overloads remove all the symlinks/shims.

Program names and "pollution"

Posted Apr 3, 2019 10:24 UTC (Wed) by lamawithonel (subscriber, #86149) [Link]

err... 6 should actually be "invert the build option so the symlinks/shims are not built by default," 7 would be "Rejoice when our AI overlords remove all the code to build and test symlinks/shims."

Program names and "pollution"

Posted Apr 3, 2019 15:19 UTC (Wed) by kh (guest, #19413) [Link] (1 responses)

Why not create a separate package postgresql-legacy-cmds to put all the deprecated commands in. That way if some end user has a bunch of scripts they don't want to update, and they ignore all the deprecation warnings for a few years, when the commands are actually deprecated, (and this new package is no longer a dependency) all they will need to do with newer systems to fix their scripts is a quick apt-get postgresql-legacy-cmds or equivalent and they can continue to use all their old scripts, but others will not be bothered. Maybe this is already implied or suggested and I missed it.

Program names and "pollution"

Posted Apr 4, 2019 13:25 UTC (Thu) by lamawithonel (subscriber, #86149) [Link]

That's the point of #3. The first-line build system is something the developers control, and doing it there makes sure everyone gets it, be that packagers in the project, distro packagers, or users who compile it themselves. Also, in my experience, a lot of people won't even consider things like removing part of the build, so giving them a way to do it, even if they don't end up using the way provided, helps jolt imagination.

Program names and "pollution"

Posted Apr 3, 2019 17:19 UTC (Wed) by rotty (guest, #14630) [Link]

Regarding step 3 (creating a separate build path to build only shims/symlinks to aid packaging), I'd like to add that this seems likely unnecessary for distributions which have a binary/source package separation, such as Debian. Whether to include specific files, and in what package binary package to include them in, is already up to the maintainer. In the case of Debian, the `debian/*.install` files specify exactly that.

This build system feature, though, would probably helpful on source-based systems, though I'm not familiar with those.

Program names and "pollution"

Posted Apr 7, 2019 0:13 UTC (Sun) by rossmohax (guest, #71829) [Link] (3 responses)

deprecate gracefully by introducing startup delay of 10 seconds every major release

Program names and "pollution"

Posted Apr 9, 2019 1:40 UTC (Tue) by k8to (guest, #15413) [Link] (2 responses)

This is an entertaining idea. My practical perspective is as a user I would not be entertained to debug this.

Program names and "pollution"

Posted Apr 9, 2019 15:16 UTC (Tue) by nix (subscriber, #2304) [Link] (1 responses)

Hm, you could deprecate gracefully by producing a non-interruptible animation of a steam locomotive every time someone types the old names? :P :P

Program names and "pollution"

Posted Apr 9, 2019 23:35 UTC (Tue) by karkhaz (subscriber, #99844) [Link]

You joke, but I'm pretty sure that Android did something similar to the delay thing...but I don't remember the details, maybe somebody else can furnish them. My recollection is that they wanted to force application developers to link against a new incompatible version of some library (maybe libc/bionic?). So they added a startup delay (I guess to _start() or something) and increased the delay every few weeks until the users noticed.

Program names and "pollution"

Posted Apr 7, 2019 23:07 UTC (Sun) by jschrod (subscriber, #1646) [Link] (5 responses)

YES!!!

And while we're at it:
- Rename creat() to create().
- Clean up that awful abbreviation "pwd" to
have something to do with passwords instead of meaning "print working directory", as any newbie would expect.

On a serious note, it's not always as practical to change established namings even if it would be sensible.

Cheers, Joachim

PS: These two changes/gripes were mentioned by Dennis Ritchie at a conference dinner where I had the occasion to be at the same table. So please don't blame me for bringing them up. :-) :-)

Program names and "pollution"

Posted Apr 8, 2019 9:01 UTC (Mon) by anselm (subscriber, #2796) [Link] (4 responses)

These two changes/gripes were mentioned by Dennis Ritchie

According to legend, Ken Thompson was once asked what he would do differently if he were to redo Unix from scratch. His answer was “I'd spell ‘create()’ with an ‘e’ at the end.”

OTOH, if your main means of interaction with the computer is a 110-baud teletypewriter, you may be forgiven for wanting to make every character count. In that situation, using “?” as an error message starts making a lot of sense.

Program names and "pollution"

Posted Apr 11, 2019 9:14 UTC (Thu) by mgedmin (subscriber, #34497) [Link] (3 responses)

Wasn't it a linker limitation originally? 6 characters per name, plus C name mangling prepended an underscore for some reason, so _creat was the longest you could have at the linker level.

Program names and "pollution"

Posted Apr 11, 2019 19:42 UTC (Thu) by jengelh (guest, #33263) [Link]

>Wasn't it a linker limitation originally? 6 characters per name,

There is the "localtime" call in V7 (at least whatever copy I could grab off github), which is way above 6 characters.

Program names and "pollution"

Posted Apr 11, 2019 19:51 UTC (Thu) by jengelh (guest, #33263) [Link] (1 responses)

>Wasn't it a linker limitation originally? 6 characters per name,

And as for V1, there is the "putchar" function.

Program names and "pollution"

Posted Apr 12, 2019 1:08 UTC (Fri) by neilbrown (subscriber, #359) [Link]

> And as for V1, there is the "putchar" function.

Was there?? I thought "putchar" was a macro for fputc(c, stdout), but I haven't checked V1. Rules for macro names would be different from those for linker symbols.

Program names and "pollution"

Posted Apr 2, 2019 20:41 UTC (Tue) by HenrikH (subscriber, #31152) [Link] (3 responses)

>Can someone describe a scenario where this (name of the binary not clearly indicating it's related postgres) causes issues in practice?

Well for one, for us that do not work with psql on a regular basis the problem is usually the reverse, i.e figuring out which commands to actually use to admin the database. The initial idea is usually to type psql and then try to tab complete which of course don't work for "createuser" and friends.

Program names and "pollution"

Posted Apr 2, 2019 23:58 UTC (Tue) by KaiRo (subscriber, #1987) [Link] (2 responses)

Exactly that.
I so often forget that Postgres command names assume that they are the only DB around that I curse it often enough because I forget again that what I wanted was a generic "dropdb" when I was looking for something tab-completing at "pg" or "postgre".
(And yes, dropdb is what I need most often as it's usually during testing where some SQLAlchemy or similar creates the DB but for testing my code from scratch I need to remove the DB.)

Program names and "pollution"

Posted Apr 3, 2019 8:10 UTC (Wed) by cpitrat (subscriber, #116459) [Link]

That was also my very first thought: adding the symlinks alone is useful for discoverability. It doesn't seem to have been discussed !

Program names and "pollution"

Posted Apr 3, 2019 8:34 UTC (Wed) by giggls (subscriber, #48434) [Link]

Hm you do now about pg_virtualenv?

Program names and "pollution"

Posted Apr 2, 2019 22:16 UTC (Tue) by buck (subscriber, #55985) [Link] (6 responses)

is this postgresql's problem or a Linux ecosystem problem?

i seem to recall, back in the day, that packages like postgresql would be autoconf-ed to installing someplace like /usr/local/pgsql (and it seems it still is, by default:

https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;...

) and then the programs would go in a bin subdirectory thereof etc. it's only since the FHS and distributions dumping everything that conceivably could be run into /usr/bin or /usr/sbin that it's become the case that there are thousands of things in /usr/bin that one has no clue about the purpose of

notwithstanding the slightly pejorative connotation of "dumping", i don't mean to cast blame. surely it makes sense for useful binaries not to be tucked away where nobody would know where to look for them, but something like environment modules (

http://modules.sourceforge.net/

) and nix environments achieve that goal in a somewhat more determinative fashion

Program names and "pollution"

Posted Apr 3, 2019 0:01 UTC (Wed) by KaiRo (subscriber, #1987) [Link] (1 responses)

Well, if I put /usr/local/postgres into my $PATH because I use its commands often enough, I end up with the same issue...

Program names and "pollution"

Posted Apr 3, 2019 5:23 UTC (Wed) by rsidd (subscriber, #2582) [Link]

Yes but at least it is obvious what package "createuser" belongs to in that case. If you don't add that directory to your path (which, unless you use postgres, you won't), you won't even see it. It won't break scripts, it won't clobber other binaries, the only issue is if there is another "createuser" in some other program's bin directory and for some reason you need to be able to run both -- but it's still better than putting both in /usr/bin.

Seriously, why not do this? Also, I guess newer systems like flatpak and snappy would basically be doing this.

Program names and "pollution"

Posted Apr 3, 2019 10:07 UTC (Wed) by civodul (guest, #58311) [Link] (1 responses)

Indeed, with Guix and similarly with Nix, readlink -f `which createuser` returns the absolute file name of createuser; its parent directory contains the package name, so I can see that it comes from PostgreSQL.

More generally, Nix and Guix do away with the global program name space that /usr/bin is. You can create environments on the fly with guix environment containing exactly the packages you want, so name clashes become a non-issue.

Program names and "pollution"

Posted Apr 4, 2019 5:37 UTC (Thu) by tzafrir (subscriber, #11501) [Link]

Debian had a namespace conflict between the older /usr/sbin/node (from package ax25-node , used by amature-radio operators[1]) and /usr/bin/node from the new package nodejs. Should be no conflict between the two, right? But what if you have a nodejs program for managing a ham radio[1]?

[1] Or however this is called.

Program names and "pollution"

Posted Apr 3, 2019 15:57 UTC (Wed) by jccleaver (guest, #127418) [Link]

I'm a fan of environment modules, but they're not suited for this unless you really need to segregate employees out.

This really is *primarily* a postgresql problem. I'm hard pressed to think of any conflict or overly-vague script or binary names I've experienced outside of PGSQL other than one conflict with the "maildir" utility back in the early 2000's. Most projects know to keep anything likely to be placed into a $PATH as unique as possible and seem pretty reasonable about it. That's not to say that growth isn't a problem, but that's more a function of Fedora's UsrMove and some people pushing for a conflation of Bin and Sbin than anything else.

One thing I really would like to see though is more use of libexec where appropriate. If these binaries aren't really intended for execution by humans except in unusual, debugging situations, they don't need to be in $PATH. Move them to /usr/libexec/ where they belong.

Program names and "pollution"

Posted Apr 9, 2019 22:43 UTC (Tue) by flussence (guest, #85566) [Link]

daemontools and its lineage traditionally have a (cheerfully FHS-ignoring) "/command/" directory for exactly this reason. The idea is service supervisor processes get started with this in their PATH, containing all the service helper binaries (things like start-stop-daemon might be at home in there), and then the services and user sessions under them are run with /etc/profile's PATH as usual, so as to not pollute their namespace.

The choice of directory location is unfortunately vague and didn't age well, but at least it's an attempt.

Program names and "pollution"

Posted Apr 3, 2019 2:33 UTC (Wed) by rfunk (subscriber, #4054) [Link] (8 responses)

It seems to me that a possible solution would be for a packager to isolate these commands in one pgsql directory, then create a "pg" command in /usr/bin that would take subcommands like git, and would look in the pgsql directory for the subcommands. Then those who really want to run unprefixed "createuser" would have to add the pgsql directory to their PATH, while the rest would run "pg createuser".

Program names and "pollution"

Posted Apr 3, 2019 7:35 UTC (Wed) by cavok (subscriber, #33216) [Link]

I was also thinking along this line. Make the legacy names be opt-in so that when legacy references are expected it is easy for the admin to get along. This way new users can start with the clean setup and avoid the lock-in.

Program names and "pollution"

Posted Apr 3, 2019 14:48 UTC (Wed) by cortana (subscriber, #24596) [Link] (5 responses)

I'm afraid that would break for people who use util-linux's 'pg' command as their PAGER.

Program names and "pollution"

Posted Apr 3, 2019 14:56 UTC (Wed) by rfunk (subscriber, #4054) [Link] (2 responses)

Fine, call it pgcmd or anything. The specific name (of the command or the directory) isn't important.

Program names and "pollution"

Posted Apr 4, 2019 17:28 UTC (Thu) by zdzichu (subscriber, #17118) [Link] (1 responses)

pgctl

Program names and "pollution"

Posted Apr 9, 2019 22:54 UTC (Tue) by flussence (guest, #85566) [Link]

Why not both? And to keep things interesting, have them both implement similar functionality, but differ in behaviour just enough to have one completely break when used outside of a completely default setup.

/me glares in pulseaudio's general direction...

Program names and "pollution"

Posted Apr 4, 2019 16:42 UTC (Thu) by perennialmind (guest, #45817) [Link]

Well that's just awful. pg would otherwise be the obvious choice. It's certainly the first thing I'd try tabbing at the console. Actually, thinking back, I think I did exactly that years ago and was peeved to realize what I'd stepped in. Postgres deserves a two-letter namespace prefix. Thankfully most distros have cleared the stinking pile off the path long ago and Debian derivatives will soon.

Whatever anchor they choose, I'll add an alias of my own. pg createuser just feels right.

Program names and "pollution"

Posted Apr 4, 2019 17:23 UTC (Thu) by perennialmind (guest, #45817) [Link]

Those people are already having to adapt. It's been deprecated in util-linux since util-linux v2.23, released in 2013 and hasn't been built by default since v2.29, released in 2016. After 2016, Debian, Ubuntu and Slackware were the outliers still shipping /usr/bin/pg. After Buster is releases as as Debian 10 this year, it'll just be Slackware.

Program names and "pollution"

Posted Apr 7, 2019 20:52 UTC (Sun) by Karellen (subscriber, #67644) [Link]

I wonder if a distro like Debian could try that all by itself.

Package all the client commands into /usr/lib/postgresql/, add a "/usr/bin/pgctl" or similar utility which makes "pgctl <command> [args...]" redirect to "/usr/lib/postgresql/<command> [args...]", and then add a postgresql-legacy package which adds symlinks for "/usr/bin/<command>" to "/usr/lib/postgresql/<command>"

Do it in "sid" as soon as the freeze ends after the next release, see what breaks, and revert back to the current system if it's too bad before the following release. That's what sid is for :-)

Program names and "pollution"

Posted Apr 3, 2019 5:06 UTC (Wed) by arekm (guest, #4846) [Link]

Even git conflicted with GNU GIT (https://www.gnu.org/software/git/) even that GNU GIT was first. That ended up with gnu git being renamed to guit (https://ftp.gnu.org/gnu/git/old/ vs https://ftp.gnu.org/gnu/git/)

Program names and "pollution"

Posted Apr 3, 2019 7:11 UTC (Wed) by lkundrak (subscriber, #43452) [Link] (4 responses)

If my memory serves well, the Plan 9 shell executes binaries also in subdirectories; e.g. "foo/bar" runs "/bin/foo/bar". This allows for some neat structuring without the need for wrapper commands.

Program names and "pollution"

Posted Apr 3, 2019 10:00 UTC (Wed) by epa (subscriber, #39769) [Link] (3 responses)

+1 to that but maybe also "git foo" could be an alias for "git/foo", if a directory git/ exists in the PATH. Then a lot of these wrapper commands could be tidied up.

Program names and "pollution"

Posted Apr 3, 2019 13:19 UTC (Wed) by mathstuf (subscriber, #69389) [Link] (2 responses)

So `git` needs two `PATH` entries to work? Otherwise `git` would fail because it's a directory…

Program names and "pollution"

Posted Apr 3, 2019 13:54 UTC (Wed) by epa (subscriber, #39769) [Link] (1 responses)

I imagined that just 'git' would produce a message from the shell saying 'git is a directory but the following subcommands exist: git grep, git pull, ...'

That doesn't work if the main 'git' program is more than just a simple wrapper for subcommands -- if there were some hypothetical 'git -xyz' that did something by itself. And the shell's message would be much more basic than the help text printed by the 'git' binary. But there is always the top-level manual page.

Program names and "pollution"

Posted Apr 3, 2019 17:03 UTC (Wed) by martinfick (subscriber, #4455) [Link]

It works if you put them in different directories.

Program names and "pollution"

Posted Apr 3, 2019 13:04 UTC (Wed) by geert (subscriber, #98403) [Link] (1 responses)

I wrote a script "linux-version", which creates a version string from the Makefile in a Linux source tree, and prints it.

Only recently did I discover this was the cause of mysteriously appearing files "/var/lib/initramfs-tools/v." and "/boot/initrd.img-v.".
Apparently Ubuntu already has a command named "linux-version", which it wants to call every time the initramfs-tools package is upgraded...

Program names and "pollution"

Posted Apr 3, 2019 16:42 UTC (Wed) by BenHutchings (subscriber, #37955) [Link]

Sorry about that :-)

Program names and "pollution"

Posted Apr 3, 2019 21:12 UTC (Wed) by david.a.wheeler (subscriber, #72896) [Link]

At first I thought "A Linux user's $PATH likely contains well over a thousand different commands..." meant "a thousand different directories". That is highly unlikely, and not what the author meant anyway (but I note it in case someone else has that misunderstanding).

Trying to figure out "what package installed this" from just the name is a terrible idea. There are already package management tools that accurately provide this information; please use them. Trying to guess from the name will be wrong too often to be useful.

I think if you are creating new programs it'd be wise to have easily disambiguated names. Not because that should replace a package manager, but because that will avoid a lot of unnecessary heartache and confusion if the same name has multiple meanings.

I think it'd be good if PostgreSQL created synonyms with new non-generic names and used them uniformly in new scripts, while retaining the old (deprecated) names for a long time for backwards compatibility. Not because you're trying to replace a package manager, but because someone who never uses PostgreSQL is likely (sooner or later) to use the same names. If you supported the "old" and "new" names for a long time (say 7+ years), it could be relatively painless.

Program names and "pollution"

Posted Apr 4, 2019 13:29 UTC (Thu) by simosx (guest, #24338) [Link]

It is really poor CLI usability to create such generic commands.
The Postgress community should act and fix this issue without the need to be told to.

In terms of usability, they use should have a single entry command like "pg" (from PostGress).
The user would need to run "pg" to get a helpful reminder screen with the available subcommands.
If the user wants to perform cluster tasks, they would run "pg cluster" and get the list of "cluster" subcommands.
Like, "pg cluster create", "pg cluster ls", etc.

As it is now, you need to remember "pg_lsclusters", which is wrong in many ways. It is the wrong order of words. "cluster" is plural because otherwise the command would look silly.

In addition, Postgress can provide shell completion (bash-completion) rules to help users with the commands.

It is up to Postgress to plan for a transition and make the CLI commands somewhat better.

Program names and "pollution"

Posted Apr 7, 2019 0:40 UTC (Sun) by tlw (guest, #31237) [Link]

This is what GNU stow is for.

Program names and "pollution"

Posted Apr 9, 2019 20:11 UTC (Tue) by mirabilos (subscriber, #84359) [Link]

There’s always 「dpkg -S $(which programname)」 if you need to figure out where a utility comes from…


Copyright © 2019, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds