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 1qMTvY-002VWy-Or for pgsql-admin@arkaria.postgresql.org; Thu, 20 Jul 2023 13:42:44 +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 1qMTvX-007t0x-8Y for pgsql-admin@arkaria.postgresql.org; Thu, 20 Jul 2023 13:42:43 +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 1qMTvW-007t0l-UL for pgsql-admin@lists.postgresql.org; Thu, 20 Jul 2023 13:42:42 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qMTvT-000eno-MV for pgsql-admin@lists.postgresql.org; Thu, 20 Jul 2023 13:42:42 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-3fba8e2aa52so7120525e9.1 for ; Thu, 20 Jul 2023 06:42:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689860559; x=1690465359; h=content-transfer-encoding:in-reply-to:disposition-notification-to :from:references:to:content-language:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=NG6RX74jF/rUPukTcvxNpmNSjMuSWuxYhn44bGkpso8=; b=A9GhRUsq+mWAzN/Y5wNUMduQuZFWoRsv6x4ILnNlqYlF9IzkCeaBn302YO9bvidaLJ ireuwndB9IKnKfRh/sKDTcj0aekV0D35VlG6VWWnfA4wLL1lwSlfozYCPZVHUUmiQXDJ lGt4KW1KN7pki0ya22gqu6E65coelbOq1cOS9N9TNhBlU4rQYZouyhTam41vP6vri2Zo +Y0txfxu+ljAcNOGlExf7bDfc9EjUukH7/aefES+ig5AJl6H5J3EQ4m2IhihVKCK4kLj LxTuTgUDhbrQeOewks6e0AWuKw+VVnj0WBqAx8XJhOevvuSpS3DmOZ7Dg1s+IY6hTSxk z9Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689860559; x=1690465359; h=content-transfer-encoding:in-reply-to:disposition-notification-to :from:references:to:content-language:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=NG6RX74jF/rUPukTcvxNpmNSjMuSWuxYhn44bGkpso8=; b=g3wWIn7GYHwGvWQ5Kw0svwq5QbI3ISmyyiCaPBZF8ZoMRST5Wb020+FVXx9ul2G0pe DIDnd10WBc2+xp0kpgvno7ixlRKZcy4c8Dj7p8xgVHYiQIVCIh732JZt2veu+q4UDXrW BGCN3zGjVJ2th0cINcr3kWWKN0YgaAg7fS9KvuHJFt3NYE9+9JqCDgElQWXaLE7QilUE MXGivwvYXdFmpIy7ijAF7Zpw1Ythm+yuN5/hN0UQwflxlYrJPAcErqOY3La0xJnt8Ud+ tPjp3JnLd4BhccbhOPL+U7DfF+tLGSQj0GjmEcbpACh2AbF4/TCwjn759J3WsqgNewX7 maoQ== X-Gm-Message-State: ABy/qLajmmvl8s+U2XfbcjmU3GJ9y/qRKKJHHANBntmqNhEUoiBUGoy1 NOkqtdPTTMfiZUoF0ClXE5RdjAveuzg= X-Google-Smtp-Source: APBJJlG10lpNbp/PYnq0nDao8xdzy5I8SOEuU2Wia6w9VTGZmfEfrX6BfMbKdzKXlNkWVQdEpG0nXQ== X-Received: by 2002:a7b:c7d0:0:b0:3fb:e206:ca5f with SMTP id z16-20020a7bc7d0000000b003fbe206ca5fmr1835191wmk.31.1689860558564; Thu, 20 Jul 2023 06:42:38 -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 q17-20020adff511000000b0031272fced4dsm1391890wro.52.2023.07.20.06.42.37 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Jul 2023 06:42:38 -0700 (PDT) Message-ID: <19cbcef2-b7e9-e696-5a64-bd7098126cc4@gmail.com> Date: Thu, 20 Jul 2023 15:42:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Upgrade from PG12 to PG Content-Language: nl, en-US, fr To: pgsql-admin@lists.postgresql.org References: <3901e0da-819b-5b6d-bb57-c29f6d384725@gmail.com> <02E1F4FD-C346-4169-86F5-2CB17232D838@gmail.com> From: Jef Mortelle Disposition-Notification-To: Jef Mortelle In-Reply-To: <02E1F4FD-C346-4169-86F5-2CB17232D838@gmail.com> 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 Hi, Alsready tried to use --link and --jobs, but you cannot ommit the "select  lo_unlink ...."   for every rows containing datatype text in your database that the pg_* program creates in the export/dump file. These select's takes a lot of time, hours ... The pg_dumpall => size of the dumpfile is much more than the size of exported database Kind regards On 20/07/2023 15:29, Edward J. Sabol wrote: > On Jul 20, 2023, at 7:23 AM, Jef Mortelle wrote: >> I use /usr/lib/postgresql15/bin/pg_upgrade -v -p 5431 -P 5432 >> >> 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 from 10.23. > > Have you considered adding the --link and --jobs=NN (where NN is the number of CPU cores on your server minus 2 or something like that) to your pg_upgrade command? I wonder if that would speed things up significantly. > > Also, if your file system supports reflinks (Linux kernel 4.5 and XFS with reflink support activated or Btrfs or macOS APFS), then use --clone instead of --link. > > Good luck, > Ed >