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 1qNv3O-006KzC-BI for pgsql-admin@arkaria.postgresql.org; Mon, 24 Jul 2023 12:52:46 +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 1qNv3M-00A7to-Dv for pgsql-admin@arkaria.postgresql.org; Mon, 24 Jul 2023 12:52:44 +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 1qNv3M-00A7td-1G for pgsql-admin@lists.postgresql.org; Mon, 24 Jul 2023 12:52:44 +0000 Received: from mailout.easymail.ca ([64.68.200.34]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qNv3J-001HLY-AK for pgsql-admin@lists.postgresql.org; Mon, 24 Jul 2023 12:52:42 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 5A104E1CB1; Mon, 24 Jul 2023 12:52:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elevated-dev.com; s=easymail; t=1690203158; bh=Vo5wGi6/isdSBTBaMcALGP9HJUTeDqRgK2iSWpfKyuU=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=IgqxtZAFjOdF7x/c1gkZyPYLQbyIzNM8/Tbhqu390ee1kSJg17yvNzWEoe0rjRzqt vHpZvUxVVO4Aj4Z5bhebF6wuQ/bY/T4RanObAT4S759Wt4uXxfowa/UuzjaotOG+ip m8Oeh2meyoQEcvQyicb+U8ueDNTFfmGIUylh2NK975ndUbwj4jM2Sjfg2holUJ76F2 otMtyyWGCwaJhKWCadivV3ZbOQlPDknVjmyZ8W4n1kJ4z/UAOy8B+Aqq9Y3XI8piDD FFdTe+nI+XvQY8jvfF8M9ciNu662mYY0xA+jtPReD14r35U70YOPhTI7au9YCISeMq /A5ew7qInmU5A== X-Virus-Scanned: Debian amavisd-new at emo08-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo08-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BZ1QMPGlUx2T; Mon, 24 Jul 2023 12:52:38 +0000 (UTC) Received: from smtpclient.apple (unknown [165.140.184.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id D4E71E14F5; Mon, 24 Jul 2023 12:52:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elevated-dev.com; s=easymail; t=1690203158; bh=Vo5wGi6/isdSBTBaMcALGP9HJUTeDqRgK2iSWpfKyuU=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=IgqxtZAFjOdF7x/c1gkZyPYLQbyIzNM8/Tbhqu390ee1kSJg17yvNzWEoe0rjRzqt vHpZvUxVVO4Aj4Z5bhebF6wuQ/bY/T4RanObAT4S759Wt4uXxfowa/UuzjaotOG+ip m8Oeh2meyoQEcvQyicb+U8ueDNTFfmGIUylh2NK975ndUbwj4jM2Sjfg2holUJ76F2 otMtyyWGCwaJhKWCadivV3ZbOQlPDknVjmyZ8W4n1kJ4z/UAOy8B+Aqq9Y3XI8piDD FFdTe+nI+XvQY8jvfF8M9ciNu662mYY0xA+jtPReD14r35U70YOPhTI7au9YCISeMq /A5ew7qInmU5A== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: Upgrade from PG12 to PG From: Scott Ribe In-Reply-To: Date: Mon, 24 Jul 2023 06:52:26 -0600 Cc: pgsql-admin@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <3901e0da-819b-5b6d-bb57-c29f6d384725@gmail.com> <1cb1652e-286a-077e-950d-516970ecf499@gmail.com> To: Jef Mortelle X-Mailer: Apple Mail (2.3731.600.7) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Jul 24, 2023, at 12:38 AM, Jef Mortelle = wrote: > For some reason Postgres creates a new subdirectory for each PG = version (I make use of tablespaces for each database in my PG cluster), = also with using the link option. > So after some upgrade, it ends in a really mess with directory's? At the end of pg_upgrade, you can start up the old version against the = old directory, or the new version against the new directory. (With = --link, only until writing into the db, then you are committed to the = running version.) Once you are comfortable that everything is good with = the new version, you should delete the old data. Alternatively, if there = is a problem forcing you back to the old version, you delete the new = data. > =3D> pg_dump schema_only, after RAM upgrade from 8GB up to 64GB = (otherwise the query against pg_largeobject ends in a OUT of Memory = error) runs in about 3-4 minutes > =3D> pg_restore takes 7 hours, which is 99% used for executing the = query like: SELECT pg_catalog.lo_unlink('oid'); Given the tests you've run, it seems to me that it is doing something = which it ought not when using --link. > Database is 95GB, so not so big ;-) but have ~25miljon large objects = in it. I suppose the use of large objects here is an artifact of support for = other databases which have much lower limits on varchar column length.