Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qyYff-0099dQ-4J for pgsql-novice@arkaria.postgresql.org; Thu, 02 Nov 2023 14:27:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qyYfd-00Dcv7-Dt for pgsql-novice@arkaria.postgresql.org; Thu, 02 Nov 2023 14:27:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qyYfd-00Dcux-5C for pgsql-novice@lists.postgresql.org; Thu, 02 Nov 2023 14:27:41 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qyYfZ-003cD3-VJ for pgsql-novice@lists.postgresql.org; Thu, 02 Nov 2023 14:27:39 +0000 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40859c464daso7458255e9.1 for ; Thu, 02 Nov 2023 07:27:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1698935255; x=1699540055; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=FcNu4nH33+gvWz2GMiyJlR4Vs/6sK5Ot1MPUUSDt+TI=; b=uO098Z8jVC9BBcYy2eUdlyjaoSxPZsXAvUPteD9ChclAZPsUt+WVll2qi2pH0jIpEJ h80TBMu3hQLMBww/XfcX4Spv5uD3e1t4cAvuQ5nSlapMrfqBNB6i7nv5LIFXwVWXh65e o+kKzpSiqV+MnhrNg5igwL/7BD6HN5zn+XDyvx/rr/8U/ci7HoVqk1BIHTIAHR767W/6 SmBG68tbObYfAuWuTrh1PGD7T3rqR8N26ZQv7eU56egg7JDBBFxQxE2aHTmluFBDydyy 3Tfp805inzV/v3GhTJetVDyuAzKVqotvAEdRfpk9NYZ7U1Rv0cVvihp+R9YgJn2+Kn3a 4l8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698935255; x=1699540055; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=FcNu4nH33+gvWz2GMiyJlR4Vs/6sK5Ot1MPUUSDt+TI=; b=DrTeMs5tCsNQ8bZtIAMtliBq4Ht8Hdg5snf/dMGsX3Vk523NUxcwEZbcrwzi7JYOop wYaIpMJfvSuxUCxsDDeax5VkqdqBy3JtfOR00IvSLZpE8emK7yK0Knsz2ejletYj5Vvt WgZfi+g7CnrRV/NXr25HWKT+S3mguRttVObKj2obIo+8QJjIdPIsqRHpwMJW6ZyvUAPf vmXbx2RiDOoMnE8kWXVi2FRHFOa0kXg2il18eyYzu0xU4Zq83ATNNbIzEUQquub5/psj KuEfcaaFTTrGjrgLabEGYgbf3CmeE8iJVB/sKpPzu+YdigMk0rSdtJhmYKpcyNNLwXHi Y5vw== X-Gm-Message-State: AOJu0Yx9nY+RE5dNXCexP1UrK/Cfw8JDZXEjcAxOFWNmuultvZE3QHgp AWeLP3tpN0YAWJa7eyv1Azp6HgqDVMw4gLdoN0c= X-Google-Smtp-Source: AGHT+IFK9wlim+otMtyj/RQvXKcj1FDF6U8D10gptsYYefXgpUrOi2p663AKOulkdyqNJNJ/PZrfqQ== X-Received: by 2002:a05:6000:2c8:b0:32f:869e:b24b with SMTP id o8-20020a05600002c800b0032f869eb24bmr13318435wry.14.1698935255391; Thu, 02 Nov 2023 07:27:35 -0700 (PDT) Received: from localhost.localdomain ([2001:871:5e:671d:efcb:786d:3c60:89d1]) by smtp.gmail.com with ESMTPSA id o11-20020a5d408b000000b0032dc2110d01sm2594045wrp.61.2023.11.02.07.27.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 07:27:35 -0700 (PDT) Message-ID: Subject: Re: fail to run postgresql16 after update from postgresql13 From: Laurenz Albe To: Ianseeks , pgsql-novice@lists.postgresql.org Date: Thu, 02 Nov 2023 15:27:34 +0100 In-Reply-To: <5997577.lOV4Wx5bFT@lian-li> References: <4842483.GXAFRqVoOG@lian-li> <5997577.lOV4Wx5bFT@lian-li> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 2023-11-02 at 11:13 +0000, Ianseeks wrote: > On Thursday, 2 November 2023 10:16:33 GMT Laurenz Albe wrote: >=20 > > > I can't get Akonadi to load as it fails to start postgresql16, its fa= iling > > > with a message saying it needs postgesql9.6 as the DB was originally > > > created using 9.6. I can't see why it insists on ver 9.6 being there = as > > > i've updated to ver 16 and that process means i create an empty DB. = I > > > can't even install Ver 9.6 to see if that cures the problem as its no > > > longer in the opensuse repos. > > >=20 > > > This is from "systemctl status postgresql.service" > > >=20 > > > Oct 31 16:24:13 Lian-Li systemd[1]: Starting PostgreSQL database serv= er... > > > Oct 31 16:24:13 Lian-Li postgresql-script[5916]: Your database files= were created by PostgreSQL version 9.6. > >=20 > > These error messages are not from PostgreSQL, but they seem to be from > > the script "postgresql-script". That script is not part of PostgreSQL. > >=20 > > Look into that script and try to figure out how it arrives at that > > conclusion. If you cannot figure it out yourself, please share the rele= vant > > parts. >=20 > Is it acceptable to attach text files to email in this mailing list? I k= now=20 > some don't like it. > I've found the script file (/usr/share/postgresql/postgresql-script) and = that=20 > message is in there but the coding in it is beyond my expertise as i can = only=20 > do basic stuff. > Here is a cut and paste of part of it. >=20 > ----- /usr/share/postgresql/postgresql-script ---- >=20 > PG_SYSCONFIG=3D/etc/sysconfig/postgresql > test -f $PG_SYSCONFIG && . $PG_SYSCONFIG Look into "/etc/sysconfig/postgresql" and see if it sets POSTGRES_DATADIR. > eval DATADIR=3D${POSTGRES_DATADIR:-~postgres/data} If not, DATADIR is set to the subdirectory "data" of the home directory of user "postgres". Is DATADIR the data directory you upgraded? > OPTIONS=3D${POSTGRES_OPTIONS} > INITDB_OPTS=3D${POSTGRES_INITDB_OPTS} > PIDFILE=3D$DATADIR/postmaster.pid >=20 > #=20 > if test -r $DATADIR/PG_VERSION ; then > DATA_VERSION=3D$(cat $DATADIR/PG_VERSION) > POSTGRES=3D/usr/lib/postgresql$(echo -n $DATA_VERSION | tr -d .)/bin/= postgres > fi DATA_VERSION is set to the first line in the PG_VERSION file in DATADIR. What is that? According to the error message, it should be 9.6. POSTGRES is set to /usr/lib/postgresql/b= in/postgres > if test -x /usr/bin/postgres; then > ACTIVE=3D$(readlink -q -f /usr/bin/postgres) > test -z "$POSTGRES" && POSTGRES=3D"$ACTIVE" > fi > if test -n "$DATA_VERSION"; then > if test -z "$ACTIVE" -o "$ACTIVE" !=3D "$POSTGRES"; then > echo " Your database files were created by PostgreSQL version $DATA_VERS= ION." Looks like /usr/bin/postgres, if you resolve the symbolic link, is differen= t from POSTGRES constructed above. Yours, Laurenz Albe