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 1sZ9YG-00GkpO-8W for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Jul 2024 13:39:36 +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 1sZ9YE-006z5u-HM for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Jul 2024 13:39:34 +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 1sZ9YE-006z3N-6v for pgsql-hackers@lists.postgresql.org; Wed, 31 Jul 2024 13:39:34 +0000 Received: from mail-yb1-xb2c.google.com ([2607:f8b0:4864:20::b2c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sZ9YB-002Ngx-Lo for pgsql-hackers@postgresql.org; Wed, 31 Jul 2024 13:39:32 +0000 Received: by mail-yb1-xb2c.google.com with SMTP id 3f1490d57ef6-e0b9d344d66so2020455276.1 for ; Wed, 31 Jul 2024 06:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722433171; x=1723037971; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gQlizAx5DHu8boG9Bakan8fkEbx9YGSj35gup8hXNP0=; b=SiMfjHJzfgbzre47YIv3mgtsRTmK+PlZJbkAoLrxPeFensz4So5wDkaMA+uyd4wmwO cqHlKvQ5oGOnlLMQBdiEWeUQfWywAQbwCfkEfD1PtYbaQfsgLgkc2DF9u0zgyj5fwgzh p10Jao3UH0cIvAEZjbF53ywobelKE+v2v66E0xG8yAx3IIQDtiq1+ZAFiro+S3l2fKVe 7ev3zApVzDhJ3+Q1PrURdEJkv8rkNEuDQhHD6RK/w+XH3zsZLS2AqOxsy8Lk6AFVFNj+ /zOGxfQMkSTKHGqvpkimzSw4AlrLF/gycdNcVrTvVr7AxCS1aL8mCOjE9uXj3zFKScNm ft5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722433171; x=1723037971; h=content-transfer-encoding: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=gQlizAx5DHu8boG9Bakan8fkEbx9YGSj35gup8hXNP0=; b=RG/ud75w1SeROaH8TDq4Bbvgf0SsX8ks5JnUtRGyh8dwFo93GcL9g6uaq5GqAUzEj3 r+/UiB08pRZ6e7U7dwqAiF/422Io3Dk3McndtrbgNCej8/mwIB2LvCUctBiWyVJ/c31O wHUgGAreEPSiC95ig4VasRbAU18QMjmVqq1MJM3/8b1ng5T7zps3ZjzDERYwpF9GeWpv 1aIMvie8GO5AVzDtPMM8HUKTM9GG2Bj4InHRJoBJsiXPWFRCvatHXPyrUHOdse8rxIna c/6cDuwNF3ewb+lgJpHg/A4e71LEYuf/ivk0R2VUcZSU0o2A3unYXcml0jQTMYA0apF3 YP9A== X-Forwarded-Encrypted: i=1; AJvYcCWqKOs8SdiYyPCPajotokR1iwftXCYMctkVNQ8j0J0T7JWan6lDWos0vk8el2PS8gWDxsp8A+BYW2SEI7ScJdIgwQW/No3Igtq96saK X-Gm-Message-State: AOJu0YwzV7Y37KPPolW3tmU7wQgeFk90517BdQOj57Hf3gAxmQPfCqYZ wtC+LsHCLIpVXyOigaB3vEp0qA9nY4TF0sNeV80D04a7E/D9c5Fh2y2BaWbAswFjILGbFxg/ao2 cygdRtMi4dQGOLnxcxHx/9QtKXhM= X-Google-Smtp-Source: AGHT+IH+8fVmEoSGbJ5q0WPgAUYzUJlTSX815Yb0SxyCzC8DQ3aODlM+UHBrXPz2X02OuAW87VjTo1FWJs+POWowRag= X-Received: by 2002:a05:6902:1029:b0:dff:2ce8:cc1b with SMTP id 3f1490d57ef6-e0b545bc297mr17763602276.35.1722433170831; Wed, 31 Jul 2024 06:39:30 -0700 (PDT) MIME-Version: 1.0 References: <4a3ebf7d81bfc6dd4d545e5b27d6e8f6c32d8937.camel@cybertec.at> <3023817.1710629175@sss.pgh.pa.us> <6603e4e0.500a0220.a557f.4f39@mx.google.com> <3304322.1711551245@sss.pgh.pa.us> <20240327150826.GB3994937@nathanxps13> <20240401191930.GA2302032@nathanxps13> <1217588.1711999706@sss.pgh.pa.us> <1870579.1722033430@sss.pgh.pa.us> <1873872.1722035181@sss.pgh.pa.us> <1903479.1722049686@sss.pgh.pa.us> <2422717.1722201869@sss.pgh.pa.us> In-Reply-To: <2422717.1722201869@sss.pgh.pa.us> From: Alexander Korotkov Date: Wed, 31 Jul 2024 16:39:19 +0300 Message-ID: Subject: Re: pg_upgrade failing for 200+ million Large Objects To: Tom Lane Cc: Justin Pryzby , Nathan Bossart , Michael Banck , Laurenz Albe , vignesh C , "Kumar, Sachin" , Robins Tharakan , Jan Wieck , Bruce Momjian , Andrew Dunstan , Magnus Hagander , Peter Eisentraut , pgsql-hackers@postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jul 29, 2024 at 12:24=E2=80=AFAM Tom Lane wrote= : > So I'm forced to the conclusion that we'd better make the transaction > size adaptive as per Alexander's suggestion. > > In addition to the patches attached, I experimented with making > dumpTableSchema fold all the ALTER TABLE commands for a single table > into one command. That's do-able without too much effort, but I'm now > convinced that we shouldn't. It would break the semicolon-counting > hack for detecting that tables like these involve extra work. > I'm also not very confident that the backend won't have trouble with > ALTER TABLE commands containing hundreds of subcommands. That's > something we ought to work on probably, but it's not a project that > I want to condition v17 pg_upgrade's stability on. > > Anyway, proposed patches attached. 0001 is some trivial cleanup > that I noticed while working on the failed single-ALTER-TABLE idea. > 0002 merges the catalog-UPDATE commands that dumpTableSchema issues, > and 0003 is Alexander's suggestion. Nice to see you picked up my idea. I took a look over the patchset. Looks good to me. ------ Regards, Alexander Korotkov Supabase