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 1qNvBG-006LMF-IM for pgsql-admin@arkaria.postgresql.org; Mon, 24 Jul 2023 13:00:54 +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 1qNvBF-00AKgK-1Z for pgsql-admin@arkaria.postgresql.org; Mon, 24 Jul 2023 13:00:53 +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 1qNvBE-00AKgC-N8 for pgsql-admin@lists.postgresql.org; Mon, 24 Jul 2023 13:00:52 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qNvBC-001Hee-2F for pgsql-admin@lists.postgresql.org; Mon, 24 Jul 2023 13:00:51 +0000 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3159d75606dso3034020f8f.1 for ; Mon, 24 Jul 2023 06:00:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690203649; x=1690808449; h=content-transfer-encoding:in-reply-to:disposition-notification-to :references:cc:to:from:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=EK7OwvS17yeQZIjDRzYXXvxc32ymAnKJ4Y7exVX98b4=; b=dCCu2Qt+Bh6gs28p3fsabOQ/V34FtA7obCr8YzKVJ0gKW3f8S8ASh96CHC6/ea2o39 yOohiShmgKRA8DgSWDKFxFvgQfrmMxUxIrGMVWPCxsl3OCW764xCGcVHOPDorGEoCMsI vk8GwzmdUUtHTGXj6ZJAj1kB8W7zh4wQEkd4Kq51oqIajBXxxJqEG0pe/xnVNl8zV6GH ib7GrTU+VyNfQ6i3yiRGZV8TSOdRTa+syWKNmwOxAksSzgHHGMWdQT3JgWdf1gXPCn9r XskyAZ3BT27Dm91WUZx4nYbSHcLDp5UXEAK7JV+83wFlkmgbel2U2vl8HcHq2kN2GW3e S7KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690203649; x=1690808449; h=content-transfer-encoding:in-reply-to:disposition-notification-to :references:cc:to:from:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=EK7OwvS17yeQZIjDRzYXXvxc32ymAnKJ4Y7exVX98b4=; b=cp/gd9WJ1AvuGUQclImJfjTGL0+cpt7qr7yMESfiURcJi0KmEKKbm3oRYsDFXz8F8K L/5VpGi/PGCwB2w7FauuQQR5Wh0WXlt2kovprksoiE770F/PubJGh8JgEWTVzjHYc26R 5NDuytH0f84YSTT2VCAH0KyRcPUvJjk5PeidbkOHgip1FrW8gzMshf6UzhC5pGgXLonL dOtaJ09hLZmbZYqbcfUvP+hDKzPMGHBK1un4ahveVmx5Kxw3ooioRWL7yNfQhf+rjJqe 0MT2Lv8LuY2jroY/lCt/Qc6wvElkYDsiBccG+7tzSINHnbjVbOMU/4Cp1w9Z8IEmjN2p VxHg== X-Gm-Message-State: ABy/qLaHBg1+ae1LbCpEEg3GkGvZk2X5kuh4JL+hcU87E8kNUyORRS0E ByzychoR7uEOezZAp3dryKU= X-Google-Smtp-Source: APBJJlG6/ADfB1RPse4iSmDnv68BdVuhb5dwTRGZq7ujN5Xwt/fyQD/LrY396KEmbgI3HEzTCbkYnQ== X-Received: by 2002:a05:6000:108a:b0:313:e12d:b245 with SMTP id y10-20020a056000108a00b00313e12db245mr5785549wrw.29.1690203648539; Mon, 24 Jul 2023 06:00:48 -0700 (PDT) Received: from [10.1.1.193] (94-224-49-27.access.telenet.be. [94.224.49.27]) by smtp.gmail.com with ESMTPSA id m9-20020a5d56c9000000b00313e2abfb8dsm12988245wrw.92.2023.07.24.06.00.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Jul 2023 06:00:48 -0700 (PDT) Message-ID: Date: Mon, 24 Jul 2023 15:00:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Upgrade from PG12 to PG Content-Language: nl, en-US, fr From: Jef Mortelle To: Scott Ribe Cc: pgsql-admin@lists.postgresql.org References: <3901e0da-819b-5b6d-bb57-c29f6d384725@gmail.com> <1cb1652e-286a-077e-950d-516970ecf499@gmail.com> Disposition-Notification-To: Jef Mortelle In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk correction: -k = --link On 24/07/2023 14:59, Jef Mortelle wrote: > Hello > > This is the syntax: > > export PGDATA=/pg/PG15/system > export PATH=/usr/lib/postgresql15/bin:/bin:/usr/bin:/usr/local/bin > > export PGDATAOLD=/pg/data > export PGDATANEW=/pg/PG15/system > export PGBINOLD=/usr/lib/postgresql12/bin > export PGBINNEW=/usr/lib/postgresql15/bin > > /usr/lib/postgresql15/bin/pg_upgrade -r -v -p 5431 -P 5432 -k -j 8 > >  -r =--link > > Kind regards > > On 24/07/2023 14:52, Scott Ribe wrote: >>> 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. >> >>> => 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 >>> => 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. >> >>