Control: retitle -1 pg_wrapper: Include -p NNNN argument in port selection
Control: severity -1 wishlist

> $ pg_lsclusters 
> Ver Cluster Port Status                Owner    Data directory               
> Log file
> 9.6 main    5432 down,binaries_missing postgres /var/lib/postgresql/9.6/main 
> /var/log/postgresql/postgresql-9.6-main.log
> 11  main    5433 online                postgres /var/lib/postgresql/11/main  
> /var/log/postgresql/postgresql-11-main.log
> 13  main    5434 online                postgres /var/lib/postgresql/13/main  
> /var/log/postgresql/postgresql-13-main.log
> 
> I can connect to the version 11 cluster with psql -p 5433 my_database, but 
> when I
> run pg_dump -p 5433 my_database, I get
> 
> Error: PostgreSQL version 9.6 is not installed

As per pg_wrapper(1), the version selection mechanism will pick the
cluster running on port 5432, so pg_dump -p 5433 will try to use the
9.6 pg_dump. Use `pg_dump --cluster 11/main` to make it pick the
11 pg_dump.

It would probably be a good idea to include the "-p 5433" argument in
the cluster selection algorithm - so far I refrained from doing that
in order not to create more corner cases, but I guess it just makes
sense. (And granted, -p 54NN is also how I select my local version NN
cluster here.) It's too late to do that for bullseye, though.

> BTW, is there work underway to provide a postgresql specific paragraph
> in the bullseye release notes? I am not very experienced with
> postgresql, but would be willing to help writing/proof reading/testing.

Everything should be detailed in 
/usr/share/doc/postgresql-common/README.Debian.gz.

Christoph

Reply via email to