From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id CPcoFJ9jTGd9NQEAe85BDQ:P1 (envelope-from ) for ; Sun, 01 Dec 2024 13:24:47 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id CPcoFJ9jTGd9NQEAe85BDQ (envelope-from ) for ; Sun, 01 Dec 2024 14:24:47 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=lAYTC1se; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1733059486; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=nlc2K5NzZsRdT8eTbfU8o4cF69JjdEUN6+ih35aayV8=; b=dCnGmnF73E2egaND8/eyfJ3DhwCbJ6EBvZ7XxcGqiAZvQ1mQlDfX3jMfJPmuTzAZGu9G9i KU3QKkLT/HlcxZp/T0gyaT+M1N5njwdKh8DtCM9UtXPZeDhDMwmUwFR94hB3zd6t9kchOz aFD4FDFExBTCYA1rtaKCK7XDGUNKtQk7ShWf+dCcvz2fEI+rGHfv7L7SyCCnaz7AMuDrdr i1Rfj0BpU8Q0xYpRwvmFnJpkF4vXd7xbj51RADbyBM9IHSDk1gQ/SWBwNH6/nMDO1uGPSm TU5oGcFo+ytF9keup/P7dxjTIfk6HThau/b7RQdEsqazcxYvl7297aCdxYA30g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=lAYTC1se; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1733059486; a=rsa-sha256; cv=none; b=iRqnMmORjyDdeLsnBHP4PCVOugOdxodCUuoNDpjFUvD4wX3eAgJUplqn0JtJFXOTo3k4JG z6b2y+U/BCUHM6VXcS4KQDEhqXD0CxtixT+8pZURkcqkiBgrvdODrPt2vXu0MmaxNYcyJc AvHX7urTc45C8IsVHM74vetOqt/UqbTRzQUbrreYGTmwdPtOO0wlRbII3iNH66j1O/uOMB 1kDfiiMrm35IL02206ZdkC11i1iWEikzVDyGnPI3Ko0zOe3JJQbxl2qojeydUrydiYJhCR VSJEWWkhQUs8hLuHr9la2M8QWrV8SwUBfmpbRkysWitg04Y/Oq3GLQDrXznLIw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8F7F443155 for ; Sun, 01 Dec 2024 14:24:45 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tHjvn-0002V7-1j; Sun, 01 Dec 2024 08:24:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tHjvj-0002Uf-Ad for help-guix@gnu.org; Sun, 01 Dec 2024 08:24:08 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tHjvf-0003t5-UW; Sun, 01 Dec 2024 08:24:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=nlc2K5NzZsRdT8eTbfU8o4cF69JjdEUN6+ih35aayV8=; b=lAYTC1seej3jkfQE8jWw kyTFElEYQ5IdVZIsRUOoGQKd09YIxsKe87XSl4TMTSFFHyxJPkdRlaECcXqGTSBJBDBvvlXK5YM7q k0H0L1TVA+zddWJgeF2fh7QCiJhVcfdRTEQkbCkyan8l0MzhOeH8O5orShz29TXgHNQ+snIG9zdf7 Acp5xd0D0mEi75oS91xmzMdkEE0hvjzGzeghyggVwCDadg2hETh2u+E/Dh9LKKjp27EcPClFILjVh 8VRXZLbK9s7TBAvFgOZSeXujLk3heBvdnwr0l8pULg0pAQsZX5c4ZX2Aa/27QP5yDGNy9exeo5DcV qMknNW8xhbyoNA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Gabriel Wicki Cc: help-guix@gnu.org Subject: Re: Upgrade postgres for cuirass In-Reply-To: <7ighizgp4lsdxxqxdoufy6bqwymndnaei2tv37pcxmnbjx6bzu@mogcc4xr5hco> (Gabriel Wicki's message of "Fri, 29 Nov 2024 17:33:58 +0100") References: <7ighizgp4lsdxxqxdoufy6bqwymndnaei2tv37pcxmnbjx6bzu@mogcc4xr5hco> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Primidi 11 Frimaire an 233 de la =?utf-8?Q?R=C3=A9vo?= =?utf-8?Q?lution=2C?= jour de la Cire X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sun, 01 Dec 2024 14:23:12 +0100 Message-ID: <87bjxvv8ov.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -6.41 X-Spam-Score: -6.41 X-Migadu-Queue-Id: 8F7F443155 X-TUID: wQ+i5wbcujPq Hi, Thanks for this nice writeup! Would you like to turn it into a section of the Cuirass (or Guix) manual? Gabriel Wicki skribis: > So here it is, my tiny writeup on how to upgrade postgres for cuirass > to continue working. It's actually kinda easy. > > 1. Stop and disable cuirass (to prevent it from starting and failing > after a reconfiguration): > > sudo herd stop cuirass && sudo herd disable cuirass > > 2. Dump the database contents. Ever too often (I tend to be somewhat > dense) I forget how to access postgres privileged content. Don't > be like me. > > sudo su - postgres -s /bin/sh -c pg_dumpall > /tmp/pg.dump FWIW, I used the same approach on guix.bordeaux.inria.fr, which has a relatively small database. For ci.guix.gnu.org, which has a much bigger database, I used =E2=80=98pg_upgrade=E2=80=99 instead: https://www.postgresql.org/docs/current/pgupgrade.html It went like this: --8<---------------cut here---------------start------------->8--- sudo herd stop cuirass && sudo herd disable cuirass sudo herd stop postgresql mv /var/lib/postgresql/data{,.pg13} sudo su - postgres -s /bin/sh -c "cd $PWD; /gnu/store/cng33vs1zdrqpmiz548kk= vavc7x1xpd0-postgresql-15.8/bin/initdb -D /var/lib/postgresql/data --locale= =3Den_US.UTF-8" sudo su - postgres -s /bin/sh -c "cd $PWD; /gnu/store/cng33vs1zdrqpmiz548kk= vavc7x1xpd0-postgresql-15.8/bin/pg_upgrade --old-datadir=3D/var/lib/postgre= sql/data.pg13 --new-datadir=3D/var/lib/postgresql/data --old-bindir=3D/gnu/= store/j9wnb7rvjzxdzghpvq1jmi2zfg4z2d8c-postgresql-13.15/bin --new-bindir=3D= /gnu/store/cng33vs1zdrqpmiz548kkvavc7x1xpd0-postgresql-15.8/bin" --8<---------------cut here---------------end--------------->8--- The store file names are those of Postgres 13 (the one that was used so far) and 15 (as returned by =E2=80=98guix build postgresql@15=E2=80=99 with= the target Guix revision). That was a couple of hours ago. Apparently it went well, though postgresql is slower than before so I wonder if there are options I forgot to pass or something. Ludo=E2=80=99.