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 1to4u8-005iGs-Ad for pgsql-committers@arkaria.postgresql.org; Fri, 28 Feb 2025 18:16:09 +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 1to4u9-00CM4c-8a for pgsql-committers@arkaria.postgresql.org; Fri, 28 Feb 2025 18:16:07 +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 1to4u9-00CM4U-1P for pgsql-committers@lists.postgresql.org; Fri, 28 Feb 2025 18:16:07 +0000 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1to4u4-000DWa-0Z for pgsql-committers@lists.postgresql.org; Fri, 28 Feb 2025 18:16:07 +0000 Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-307325f2436so25967871fa.0 for ; Fri, 28 Feb 2025 10:16:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740766564; x=1741371364; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Ys/h6LYc4ZzEV3iVf8XJ87dOub2ZzqNwIVtWIFpCjmQ=; b=PpU1uv/ulhM4kaeCOEDHRjKFeSCirqe8/yGnzQ2mqhgsZTOYSLfmN9fxfdJ2rEn7MD VeqDVuez0egN77BbnInKgmzYoN2hSe2GmDdkZUixsv7O0eMrh7NGs44kmM4QEM2vul6n 8KqJeAqIWK9no5KQHPovjKr6a+4cl3NRGiuCuWF5nI2Wulw9vlSPMOEC6GXyJWaRE2k8 GBHBIUxov+4immRp/JWuYns0cwORi9THgerqC5yaZf3h2FNR24YmAJtolIxazcpNUOTK 7v+eqAAlu1UCJKj46NlGLAW3KfaIpGOhzQTdVNi7t+hdERwvGzpSFOA8+FktH1PBq/dA vH4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740766564; x=1741371364; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ys/h6LYc4ZzEV3iVf8XJ87dOub2ZzqNwIVtWIFpCjmQ=; b=H3dg+eHtXU9OOQ3lmLh2mDFpvjeP2KwSOBUkADQu0zTVy8aQQl79zunASmFvB6cTSS RcYDN2aPB1o231I3zmb0DyGxaoYfYZq4ukayW/FRQw6ZRiZpz+pzYJBPIBMZwe92/eb4 Wa7skfPLtyTuv3gI6++sBIDJMxNOe+uv3pU4LH/9bO1C4RzLF1I0ef09f2gHo8Tzc9f6 iBatU9j3Zc17hZ0YNjGQlMmRdhbo/3ubflQAZjZG3ibLorTx/x4NC0F6LaaGl0xIqgyT KF3jxfcgGiNd8K/DEqW3EUQm4AiCw3joEWIKddxp4GEfiHtnsAYnQBykncRyL3r8lx/D LmKw== X-Forwarded-Encrypted: i=1; AJvYcCVErmrkuMiK7urUnd4SFzcmtl7WpLmmjTEsonyv6OiI7pqL1qFoul1CrrcidOsMU7eVH/evy2u4BnFisDCoEZ+o@lists.postgresql.org X-Gm-Message-State: AOJu0YwqiT4MbXmtFwDfZKtIz3u+ei3PHtSbB/6xaCgiqb3r91e9AQQ0 /bNizc5X+H2dz+1O9N+FtEcS49ZqA+OkkmMlmZV09AzLz+rOM9oV7wppyWaDhoLofQsUw1NFhpf u8xkuA10sKijhutKeSH529BShigY= X-Gm-Gg: ASbGncs+wDBqAB5gL9JeWsHIIafSijBwTtSHw/srvvj4081pb1VWvEL1hDcbf5iaNnt 6tfbZXWHMjMll5TlWbD8/fU50SV+BZbUJOh5Dn2UnW++LDEMmYg9e19qBKto26iS5LmpIfkQaL8 aOljPHllQ= X-Google-Smtp-Source: AGHT+IGy7WjiF+NRVJQ631S/NeKbJcUvUdqAI4ADcjdco7AF6T/Dd8dkvPwxhsjhutKO+uKNNeggqwQv70ZJ8KzsD0c= X-Received: by 2002:a2e:a0c7:0:b0:30a:4476:b09 with SMTP id 38308e7fff4ca-30b9345fda2mr14673621fa.32.1740766563856; Fri, 28 Feb 2025 10:16:03 -0800 (PST) MIME-Version: 1.0 References: <003dc9936317ab987faa0242f8e33e1cd2fcaf57.camel@j-davis.com> <40c1e76334f2baa747334c8fc513d12b8cb297bf.camel@j-davis.com> <3815127.1740189601@sss.pgh.pa.us> <5ebc188e731ac2b98d68459ce1a9ef3066981774.camel@j-davis.com> <3892121.1740193866@sss.pgh.pa.us> <976dcc37-b629-490e-a052-a057477d062f@dunslane.net> <301492.1740249291@sss.pgh.pa.us> <684274.1740273302@sss.pgh.pa.us> <812817.1740277228@sss.pgh.pa.us> <10bd5e38-c8e1-4162-8dd7-ef65e71170b4@dunslane.net> <1144186.1740338230@sss.pgh.pa.us> <2768649.1740765297@sss.pgh.pa.us> In-Reply-To: <2768649.1740765297@sss.pgh.pa.us> From: Sami Imseih Date: Fri, 28 Feb 2025 12:15:52 -0600 X-Gm-Features: AQ5f1JoncqE3WLf6HpxV_mDdRbUFszsOa2QLieNn13h9l38SlzgKwljE1f9Ih8g Message-ID: Subject: Re: pgsql: Trial fix for old cross-version upgrades. To: Tom Lane Cc: Andrew Dunstan , Jeff Davis , Jeff Davis , pgsql-committers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > 5.16 is still supported according to our install instructions, > so let's see if we can adjust that regex so it works with 5.16. > The first thing I'd try is > > - $dump =~ s {(^\s+'version',) '\d+'::integer,$} > + $dump =~ s {^(\s+'version',) '\d+'::integer,$} > With the diff below, I still observed the same issue. @@ -296,7 +296,7 @@ sub adjust_old_dumpfile # Same with version argument to pg_restore_relation_stats() or # pg_restore_attribute_stats(). - $dump =~ s {(^\s+'version',) '\d+'::integer,$} + $dump =~ s {^(\s+'version',) '\d+'::integer,$} {$1 '000000'::integer,}mg; if ($old_version < 16) @@ -645,7 +645,7 @@ sub adjust_new_dumpfile # Same with version argument to pg_restore_relation_stats() or # pg_restore_attribute_stats(). - $dump =~ s {(^\s+'version',) '\d+'::integer,$} + $dump =~ s {^(\s+'version',) '\d+'::integer,$} {$1 '000000'::integer,}mg; I also tested the same regexp expression in isolation and I could not repro the issue. Will try a real dumpfile next. /tmp/test.pl """ use strict; my $dump = " 'version', '180000'::integer,"; print "$dump\n"; $dump =~ s [(^\s+'version',) '\d+'::integer,$] [$1 '000000'::integer,]mg; print "$dump\n"; """ simseih % /usr/bin/perl -v | grep "This is perl" This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi simseih % /usr/bin/perl /tmp/test.pl 'version', '180000'::integer, 'version', '000000'::integer, -- Sami