Re: PostgreSQL pollutes the file system - Mailing list pgsql-hackers

From Isaac Morland
Subject Re: PostgreSQL pollutes the file system
Date
Msg-id CAMsGm5e29s3r3=ZHssJ+T+0LDBYYmvcxp9coAx27oktuve59cQ@mail.gmail.com
Whole thread Raw
In response to Re: PostgreSQL pollutes the file system  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
I just want to be on record that I don't think there is a problem here that needs to be solved. The choice to put Postgres-related binaries in /usr/bin or wherever is a distribution/packaging decision. As has been pointed out, if I download, build, and install Postgres, the binaries by default go in /usr/local/pgsql/bin.

It is a long-standing Unix tradition to have short-named commands from many sources in /usr/bin and /bin, not to mention other files, often with short names, in various directories all over the system. For example, on one of the Ubuntu machines at my work, take a look at all the 2-character commands in those directories, and how many different packages they come from, in the list at the bottom of this message.

At this point I think Postgres absolutely owns the name "psql" as a Unix binary and I would oppose any suggestion that this should be renamed. Just my own effort to teach my fingers to type something different would probably outweigh any benefit from renaming.

Having said this, if people are enthusiastic and can actually agree, there are a few changes that might make sense:

- move clusterdb, createdb, etc. (*db, but not initdb because that is a server, not client, program) into pg_db_util [subcommand] (or some such)
- move createuser, dropuser into pg_role_util [subcommand] (or some such)
- pgbench -> pg_bench (why no '_' anyway?)
- ecpg -> pg_ec (usually invoked by makefiles anyway, I'm guessing)

But I consider this worth doing only if people consider that it's an improvement for reasons other than just getting stuff out of /bin or /usr/bin.

List of 2-character commands and their source packages on one of our systems (the "no path found" ones are mostly symlinks into the Ubuntu "alternatives" system):

16:52 ijmorlan@ubuntu1604-102$ dpkg -S /usr/bin/?? /bin/?? | sort
dpkg-query: no path found matching pattern /usr/bin/cc
dpkg-query: no path found matching pattern /usr/bin/ex
dpkg-query: no path found matching pattern /usr/bin/fp
dpkg-query: no path found matching pattern /usr/bin/js
dpkg-query: no path found matching pattern /usr/bin/pc
dpkg-query: no path found matching pattern /usr/bin/rn
dpkg-query: no path found matching pattern /usr/bin/rt
dpkg-query: no path found matching pattern /usr/bin/vi
dpkg-query: no path found matching pattern /bin/mt
dpkg-query: no path found matching pattern /bin/nc
acct: /usr/bin/ac
apache2-utils: /usr/bin/ab
aspectj: /usr/bin/aj
at: /usr/bin/at
bc: /usr/bin/bc
bf: /usr/bin/bf
binutils: /usr/bin/ar
binutils: /usr/bin/as
binutils: /usr/bin/ld
binutils: /usr/bin/nm
bsdmainutils: /usr/bin/hd
bsdmainutils: /usr/bin/ul
byobu: /usr/bin/NF
coreutils: /bin/cp
coreutils: /bin/dd
coreutils: /bin/df
coreutils: /bin/ln
coreutils: /bin/ls
coreutils: /bin/mv
coreutils: /bin/rm
coreutils: /usr/bin/du
coreutils: /usr/bin/id
coreutils: /usr/bin/nl
coreutils: /usr/bin/od
coreutils: /usr/bin/pr
coreutils: /usr/bin/tr
coreutils: /usr/bin/wc
cups-client: /usr/bin/lp
dash: /bin/sh
dc: /usr/bin/dc
debhelper: /usr/bin/dh
diversion by dash from: /bin/sh
diversion by dash to: /bin/sh.distrib
ed: /bin/ed
ghostscript: /usr/bin/gs
graphviz: /usr/bin/gc
gv: /usr/bin/gv
i3-wm: /usr/bin/i3
ii: /usr/bin/ii
iproute2: /bin/ip
iproute2: /bin/ss
ispell: /usr/bin/sq
login: /bin/su
login: /usr/bin/sg
m4: /usr/bin/m4
mc: /usr/bin/mc
mercurial: /usr/bin/hg
mono-devel: /usr/bin/al
mono-devel: /usr/bin/lc
mono-devel: /usr/bin/sn
mtools: /usr/bin/lz
mtools: /usr/bin/uz
p7zip-full: /usr/bin/7z
procps: /bin/ps
rcs: /usr/bin/ci
rcs: /usr/bin/co
rs: /usr/bin/rs
ruby: /usr/bin/ri
sc: /usr/bin/sc
speech-tools: /usr/bin/dp
tex4ht: /usr/bin/ht
texlive-binaries: /usr/bin/mf
util-linux: /usr/bin/pg
xz-utils: /usr/bin/xz

pgsql-hackers by date:

Previous
From: Jehan-Guillaume de Rorthais
Date:
Subject: Re: block-level incremental backup
Next
From: Peter Billen
Date:
Subject: serializable transaction: exclude constraint violation (backed byGIST index) instead of ssi conflict