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 1qMTiw-002V7D-92 for pgsql-admin@arkaria.postgresql.org; Thu, 20 Jul 2023 13:29:42 +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 1qMTiu-007YfW-Jx for pgsql-admin@arkaria.postgresql.org; Thu, 20 Jul 2023 13:29:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qMTiu-007YfG-8c for pgsql-admin@lists.postgresql.org; Thu, 20 Jul 2023 13:29:40 +0000 Received: from mail-yw1-x112a.google.com ([2607:f8b0:4864:20::112a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qMTir-000eiL-36 for pgsql-admin@lists.postgresql.org; Thu, 20 Jul 2023 13:29:39 +0000 Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-5728df0a7d9so9150797b3.1 for ; Thu, 20 Jul 2023 06:29:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689859776; x=1690464576; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:content-transfer-encoding:from:to:cc:subject:date :message-id:reply-to; bh=WpBmTPo4ql/Sm0o/P08jSMEmdDYUb2hZPEqcVP4XFCM=; b=d7IgtwgAZXkwyU/6Ld0fdi+dRm/1zxOBKTiol0BHPCzrLhZxNNeoXCPQjt3vrlrPNe 8I7zeuLmawPzhwxxwK9XD35XGZBqnoKDyg5oe2gMPYhIVTlDXgPM1p9cr+13Y+HSAy9p H/jUbMmx244M1+MyWjl+URBGkQo4hj0VPFQQE6mr46UPcrTDczsUMxv5paelqzI7a6Th ewuVV8bX6RUPVcxa/yDmfdx8rRtiEsbQoH+vf7sPiCp6nFW+0YS4hn5pEUCuXR8LaZTa qfhj8UV9OFCChl/FlIOt49A4PPFZBWz+H8iiJv1bjnZM9uAtU2f7NCdPMqx3vgOZUMen 6RCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689859776; x=1690464576; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:content-transfer-encoding:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=WpBmTPo4ql/Sm0o/P08jSMEmdDYUb2hZPEqcVP4XFCM=; b=BBgISXT1XuOYqxzim0RU1O48jW69H7bwC0GUw+C+FuRn5kGmvJlj4pnMIqdCWuMqCG tQYmp62zZO0XSAaoLNoWHJ6U1aU10nKD9qJfyJD/R8cJuIKcaO4PZW2hGDKxf8AxQxaZ 1+ryPrVwIlI+29G+RUA75ksg2bqAOaVk94XUPTLoet3pQ3ICWeMxo5Yjf7BQ/Z+2empc +vfRcCaULgTsrk+zH0vFc4lkCpAg7HpMINClwbWa6XzCEDFSNj12WJxltM8QI+SVlIrn MawxiugmyVVBfuUqCVljtX2LMcBmK46Pt+UOH7uhwNA2Qr9ujUSpFTm5pq4ujETGeyGb QixQ== X-Gm-Message-State: ABy/qLbZoy9BQDIMQoo1F8yrEzzLWnuG0oXa/Mz2FCxnz3l/qguQo22k Ui0HcRA7M1EOvO9llwrsdOuzecNflrE= X-Google-Smtp-Source: APBJJlGDB5oGFruJGcw1yFXPWutxXnhI7CgiN3L8g3aKm5icRBKgFd8d3Cn0pLmLli7mcOhDQnpquQ== X-Received: by 2002:a81:5485:0:b0:56d:824e:d93f with SMTP id i127-20020a815485000000b0056d824ed93fmr6155365ywb.38.1689859776468; Thu, 20 Jul 2023 06:29:36 -0700 (PDT) Received: from smtpclient.apple ([2601:14b:4100:252f:7d55:fa81:b56e:9597]) by smtp.gmail.com with ESMTPSA id h123-20020a0df781000000b00578942e2a86sm202237ywf.60.2023.07.20.06.29.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Jul 2023 06:29:36 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Subject: Re: Upgrade from PG12 to PG From: "Edward J. Sabol" In-Reply-To: <3901e0da-819b-5b6d-bb57-c29f6d384725@gmail.com> Date: Thu, 20 Jul 2023 09:29:25 -0400 Cc: pgsql-admin@lists.postgresql.org Message-Id: <02E1F4FD-C346-4169-86F5-2CB17232D838@gmail.com> References: <3901e0da-819b-5b6d-bb57-c29f6d384725@gmail.com> To: Jef Mortelle X-Mailer: iPad Mail (20F75) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Jul 20, 2023, at 7:23 AM, Jef Mortelle wrote: > I use /usr/lib/postgresql15/bin/pg_upgrade -v -p 5431 -P 5432 >=20 > I takes a lot of time, more than 6 hours I'm in the middle of a similar database migration myself, but I'm coming fro= m 10.23. Have you considered adding the --link and --jobs=3DNN (where NN is the numbe= r of CPU cores on your server minus 2 or something like that) to your pg_upg= rade command? I wonder if that would speed things up significantly. Also, if your file system supports reflinks (Linux kernel 4.5 and XFS with r= eflink support activated or Btrfs or macOS APFS), then use --clone instead o= f --link. Good luck, Ed