Package Details: postgresql-13-upgrade 13.10-1

Git Clone URL: https://aur.archlinux.org/postgresql-13-upgrade.git (read-only, click to copy)
Package Base: postgresql-13-upgrade
Description: PostgreSQL build for migrating between major versions with pg_upgrade
Upstream URL: https://www.postgresql.org/
Licenses: custom:PostgreSQL
Submitter: ixeft
Maintainer: None
Last Packager: ixeft
Votes: 0
Popularity: 0.000000
First Submitted: 2023-02-23 08:54 (UTC)
Last Updated: 2023-02-23 08:54 (UTC)

Latest Comments

QuickmediaFan69 commented on 2024-02-21 14:49 (UTC)

Is there a v14 coming? Unable to go from 14 to 16 without this.

Koli commented on 2024-02-14 18:47 (UTC)

I am also getting a compile error. With the LLVM/Clang directrives from @klemens it compiles but the makefile fails, apparently with a segfault, pointing to line 42. I modified that from

    --with-llvm

to

    --with-llvm15

It seems to install now.

shulhan commented on 2023-12-01 11:21 (UTC)

@klemens

I just use the default PKGBUILD 1 and I can say it works without changing anything.

I am upgrading from version 13 to 15 too.

2023-12-01T10:51:49Z -->  35: sudo pacman -Sy --noconfirm postgresql-13-upgrade
:: Synchronizing package databases...
 core downloading...
 extra downloading...
 build.kilabit.info downloading...
 gce downloading...
resolving dependencies...
looking for conflicting packages...

Package (1)                               New Version  Net Change  Download Size

build.kilabit.info/postgresql-13-upgrade  13.10-1       44.98 MiB      19.28 MiB

<TRUNCATED>

2023-12-01T10:52:05Z -->  37: ls -l /opt/
total 12
drwxr-xr-x 4 root root 4096 Feb 22  2022 google-cloud-ops-agent
drwxr-xr-x 6 root root 4096 Dec  1 10:51 pgsql-13
drwxr-xr-x 6 root root 4096 Dec  1 10:44 pgsql-14
<TRUNCATED>
2023-12-01T10:57:08Z -->  46: sudo mkdir -p /var/lib/postgres/data
2023-12-01T10:57:08Z -->  47: sudo mkdir -p /var/lib/postgres/tmp
2023-12-01T10:57:08Z -->  48: sudo chown postgres:postgres /var/lib/postgres/data /var/lib/postgres/tmp
2023-12-01T10:57:08Z -->  49: sudo su - postgres -c "cd /var/lib/postgres/tmp   && initdb -D /var/lib/postgres/data --locale=en_GB.UTF-8 --encoding=UTF8"

<TRUNCATED>

syncing data to disk ... ok

initdb: warning: enabling "trust" authentication for local connections
initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
2023-12-01T10:57:10Z -->  52: sudo su - postgres -c "cd /var/lib/postgres/tmp   && pg_upgrade     -b /opt/pgsql-13/bin     -B /usr/bin     -d /var/lib/postgres/olddata     -D /var/lib/postgres/data"

<TRUNCATED>

Checking for extension updates                              ok

Upgrade Complete
----------------

<TRUNCATED>

2023-12-01T11:08:52Z -->  93: sudo systemctl status postgresql.service
Dec 01 11:08:49 app-tws postgres[2196]: 2023-12-01 11:08:49.750 UTC [2196] LOG:  starting PostgreSQL 15.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 13.2.1 20230801, 64-bit
<TRUNCATED>
Dec 01 11:08:49 app-tws postgres[2196]: 2023-12-01 11:08:49.786 UTC [2196] LOG:  database system is ready to accept connections
Dec 01 11:08:49 app-tws systemd[1]: Started PostgreSQL database server.

klemens commented on 2023-10-29 16:29 (UTC)

This needs to be changed to llvm15, as llvm16 is not supported by postgresql 13, see also the postgresql-old-upgrade package:

diff --git a/PKGBUILD b/PKGBUILD
index ae04977..c4a707d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,8 +10,8 @@ url='https://www.postgresql.org/'
 arch=('x86_64')
 license=('custom:PostgreSQL')
 depends=("postgresql-libs>=${_majorver}" 'libxml2' 'openssl>=1.0.0' 'pam'
-         'zlib' 'icu' 'systemd-libs' 'libldap' 'krb5' 'llvm-libs')
-makedepends=('python' 'perl' 'tcl>=8.6.0' 'systemd' 'llvm' 'clang')
+         'zlib' 'icu' 'systemd-libs' 'libldap' 'krb5' 'llvm15-libs')
+makedepends=('python' 'perl' 'tcl>=8.6.0' 'systemd' 'llvm15' 'clang15')
 optdepends=('python: for PL/Python 3 support'
             'perl: for PL/Perl support'
             'tcl: for PL/Tcl support')
@@ -49,7 +49,7 @@ build() {
   # Fix static libs
   CFLAGS+=" -ffat-lto-objects"

-  ./configure "${configure_options[@]}"
+  LLVM_CONFIG=llvm-config-15 CLANG=/usr/lib/llvm15/bin/clang ./configure "${configure_options[@]}"
   make -C src all
   make -C contrib all
 }

With this change, the upgrade from 13 to 15 worked fine for me.