Package: postgresql-client-common
Version: 200+deb10u3
Severity: normal

Dear Maintainer,

While trying to understand why tools like psql and pg_lsclusters worked
automatically with a cluster running on a non-standard port in one
environment and not in another environment I remembered Debian uses
pg_wrapper to implement cluster detection.

Reading through the target cluster precendence list in the pg_wrapper
man page I checked for:
- Env vars (didn't apply)
- ~/.postgresqlrc (didn't apply)
- /etc/postgresql-common/user_clusters (was empty)

Eventually I realized that even though we use initdb (rather than
pg_createcluster) we also manage configuration files in the
/etc/postgresql/<version>/<cluster_name>/ directory and that pg_wrapper
is treating that as another lookup point for finding a cluster.

It's possible that that's what "local cluster" means in precedence order
steps 7 and 8, but the term is never explained.

There is so reference to the /etc/postgresql/ directory in the
ENVIRONMENT section for PG_CLUSTER_CONF_ROOT, but again it's never
really explained how that var is used to lookup clusters.

I think the precedence order docs should explain specifically that
entries of the format <version>/<cluster_name>/postgresql.conf in the
PG_CLUSTER_CONF_ROOT (or default of /etc/postgresql/) directory will be
considered as [local?] clusters.

-- System Information:
Debian Release: 10.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-6-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages postgresql-client-common depends on:
ii  netbase  5.6

Versions of packages postgresql-client-common recommends:
ii  libreadline7  7.0-5
ii  lsb-release   10.2019051400

postgresql-client-common suggests no packages.

-- no debconf information

Reply via email to