I've been using PostgreSQL for 16 or 17 years (since around version 7.2 or 7.3). For whatever reason, I got started with using PG installing it from source. Due to inertia / fear-of-change, to this day I have never installed PG directly through the distro's repositories.
I'd like to change that --- not to the native distro's PG version, but rather to the postgres' provided repositories, so that I can install the latest version. The server I'm running is Debian 9/stretch.
I will certainly look through the docs, but I welcome any comments on the following aspects:
- I always follow the installation procedure shown in the "short version" --- but I don't see
pg_ctl. Are there direct replacements for these?
- For that matter, I see a
pg_wrapperthat, according to the
manpage, "It determines the configured cluster and database for the user and calls the appropriate version of the desired program to connect to that cluster and database". That kind of gives me the creeps. Should it not? [give me the creeps?]
I have a running 9.x installation that uses
Clocale. (originally installed from source following the "short version" installation procedure). How do I migrate to a fresh PG 11 install on a fresh/out-of-the-box server running Debian 9? This is what I usually do:
[postgres]$ pg_dumpall > dumpall.sqland copy the backup to the new machine.
- Install from source on new machine, including
/usr/local/pgsql/bin/initdb -D /home/postgres/data -E SQL_ASCII --locale=C(for the legacy application we're talking about, I cannot change this).
- As user postgres, run:
[postgres]$ psql -f dumpall.sql
Any differences or any surprises awaiting when migrating to the repositories-based install?
Does it play nice with Debian's
- What about contrib modules? Our application uses
pgcrypto; what I usually do is, before running
psqlto restore, I go to the downloaded source dir,
sudo make install(possibly also a postgres' restart?). Then, the
dumpall.sqlcontains everything to import the
pgcryptofunctionality and create the necessary functions.
Any other aspects to watch out for?