Postgresql: Difference between revisions

From Alpine Linux
(initial PostgreSQL wiki page)
 
(added guide for Upgrading PostgreSQL)
 
(One intermediate revision by the same user not shown)
Line 28: Line 28:


To configure and use PostgreSQL, please refer to the [https://wiki.alpinelinux.org/wiki/Postgresql_16 PostgreSQL 16 Alpine Wiki page] as the usage is the same.
To configure and use PostgreSQL, please refer to the [https://wiki.alpinelinux.org/wiki/Postgresql_16 PostgreSQL 16 Alpine Wiki page] as the usage is the same.
== Switching between PostgreSQL versions ==
On Alpine Linux, you can use the command `pg_versions` to switch between PostgreSQL versions. This is very helpful when upgrading the version you are using.
== Upgrading PostgreSQL ==
Please follow along with [https://beune.dev/posts/upgrade-alpine-postgresql/ this guide] and substitute the version you are moving from and the version you are upgrading to.

Latest revision as of 02:38, 23 July 2024

General

PostgreSQL is a well known opensource database that scales well and is easy to use.

PostgreSQL 16

To install, configure, and use PostgreSQL 16, which is the latest release, please refer to the PostgreSQL 16 Alpine Wiki page. It will also create a system user called postgres.

PostgreSQL 15

To install PostgreSQL 15,

apk add postgresql15 postgresql15-contrib postgresql15-openrc

rc-update add postgresql

rc-service postgresql start

This will start the postgresql 15 server and perform some initial configuration. It will also create a system user called postgres.

To configure and use PostgreSQL, please refer to the PostgreSQL 16 Alpine Wiki page as the usage is the same.

PostgreSQL 14

To install PostgreSQL 14,

apk add postgresql14 postgresql14-contrib postgresql14-openrc

rc-update add postgresql

rc-service postgresql start

This will start the postgresql 14 server and perform some initial configuration. It will also create a system user called postgres.

To configure and use PostgreSQL, please refer to the PostgreSQL 16 Alpine Wiki page as the usage is the same.

Switching between PostgreSQL versions

On Alpine Linux, you can use the command `pg_versions` to switch between PostgreSQL versions. This is very helpful when upgrading the version you are using.

Upgrading PostgreSQL

Please follow along with this guide and substitute the version you are moving from and the version you are upgrading to.