Because /usr/bin/pg_dump is a symlink to pg_wrapper. How does this work that the PostgreSQL command line commands automatically adapts to the active version. Mission accomplished! Let's see what is the active PostgreSQL version for command line commands. Start the clusters and check what is running $ sudo pg_ctlcluster 9.5 main startĩ.5 main 5432 online postgres /var/lib/postgresql/9.5/main /var/log/postgresql/ġ1 main 5433 online postgres /var/lib/postgresql/11/main /var/log/postgresql/postgresql-11-main.log $ grep -H '^port' /etc/postgresql/*/main/nf $ sudo mcedit /etc/postgresql/9.5/main/nf $ sudo pg_ctlcluster 9.5 main stopĩ.5 main 5433 down postgres /var/lib/postgresql/9.5/main /var/log/postgresql/ġ1 main 5432 down postgres /var/lib/postgresql/11/main /var/log/postgresql/postgresql-11-main.logĬhange the port in the configuration files and list the new config to be sure. We want to switch and make 9.5 version active (binding to port 5432) and make version 11 bind to port 5433. Stop the running versions and check if the servers are down. Ver Cluster Port Status Owner Data directory Log fileĩ.5 main 5433 online postgres /var/lib/postgresql/9.5/main /var/log/postgresql/ġ1 main 5432 online postgres /var/lib/postgresql/11/main /var/log/postgresql/postgresql-11-main.logĪnd what is the active PostgreSQL version for command line commands, for example pg_dump. Let's define the active PostgreSQL cluster as the one that binds to port 5432 and having multiple versions running in Ubuntu.Ĭheck with pg_lscluster what is running: $ sudo pg_lsclusters A how to of switching the active PostgreSQL cluster version to make it bind to port 5432.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |