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 1rOQKF-0043B6-Ls for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Jan 2024 22:48:32 +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 1rOQKE-0062Rx-KB for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Jan 2024 22:48:30 +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 1rOQKE-0062Rp-2e for pgsql-hackers@lists.postgresql.org; Fri, 12 Jan 2024 22:48:30 +0000 Received: from mail-io1-xd32.google.com ([2607:f8b0:4864:20::d32]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rOQK7-001FZa-4P for pgsql-hackers@postgresql.org; Fri, 12 Jan 2024 22:48:28 +0000 Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-7bc3e297bc9so309248339f.3 for ; Fri, 12 Jan 2024 14:48:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705099702; x=1705704502; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=EpHILfDMvwFm4AaQ23qC/2acc2TmpRfEyUf8FD0J6qw=; b=Y41z2xIEBnv/C0yKvMReCsFXcwnsr5l+p6Wvg1aN4D3+5jKggWxOIhM6V/xmIOi/XB n+akY5d0hJ2+uovkKt6cT6p9Xkz7S8Npew80JG2wR0YwSSIOK//KWLYI63nBn91yXGtM c1D7OEVUitEraOZc+rbo9456i9TopUAuKjqnshWxfI0Wr3HykG/a8kdTuSgoKXCn98zX ex0vbai0lhy+mzRZASOFwqOuM8vWfrVGYeTa5ctbpHdEkIqoTQCwVtGmNcOnvc2rsxdJ OqU7Ahq2wI1TSZOpn97H1SbqfntNnm5gM663RZx+eWt0HQmQiXNR4y1lAM4dWXLD55sI RgaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705099702; x=1705704502; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=EpHILfDMvwFm4AaQ23qC/2acc2TmpRfEyUf8FD0J6qw=; b=ZHP5jdl7kTG5LO5HKvyQLalob3SO4IHvLZdVzSM2Twc736oAUvLfzNThDL7SPGKJwF mQAJsqhZdspxTMERCc8nuVvlQ5lwLlzMR0rQ6PlF6UwpfDUbg6d9ucXPN48nEFfLB4Ts goiCVO5opIcRS3jWH2YINWTOXr3WGFsXEE3IqPAn+cYqUlhWeaEfmn1fC3RNCqW06oHC qOosmQOI0EK/cffV7+5gZiXWOiIaVWJ7q1XPDVU72QmIWsCpPEibU1ZjaJkLsDfGT7VR NpG0N/Vj25qtDrGZPIXVhsIxlAaqutCfExgkeAyMFnGl+YHMakXnCdUooKtm4pwah6ZK Jidw== X-Gm-Message-State: AOJu0YzVn+VDfmPxZX/ssyif/l4yhlh+m8DU0aogA0FymdBOLm+1tBoX rKACPwqCxxZmwKuswRhq0IE= X-Google-Smtp-Source: AGHT+IFx0Szbyl0fEznVPw0mm+3hp+tDSTVw9u2AcD5/IedpwKgCbYRmEOY7IQzt3PsYnD2Ngg0+tA== X-Received: by 2002:a6b:e611:0:b0:7bb:d42d:7ffd with SMTP id g17-20020a6be611000000b007bbd42d7ffdmr2119003ioh.37.1705099702255; Fri, 12 Jan 2024 14:48:22 -0800 (PST) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id a71-20020a02944d000000b0046e5486cc53sm1143429jai.86.2024.01.12.14.48.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 14:48:21 -0800 (PST) Date: Fri, 12 Jan 2024 16:48:20 -0600 From: Nathan Bossart To: Tom Lane Cc: "Kumar, Sachin" , Robins Tharakan , Jan Wieck , Bruce Momjian , Zhihong Yu , Andrew Dunstan , Magnus Hagander , Peter Eisentraut , "pgsql-hackers@postgresql.org" Subject: Re: pg_upgrade failing for 200+ million Large Objects Message-ID: <20240112224820.GB3857154@nathanxps13> References: <0643CC11-223A-4039-AC34-94E127462796@amazon.com> <1152134.1699555261@sss.pgh.pa.us> <83D44BE5-0088-4D41-8AE6-20A05D026F46@amazon.com> <81D13E16-BA04-43CF-9B89-B8924300B211@amazon.com> <240D05EC-8B28-4112-BEAB-85ECBAF3F871@amazon.com> <2055911.1702258962@sss.pgh.pa.us> <557FD681-3929-44A1-87B2-6B5E10C4A66B@amazon.com> <4107508.1704218778@sss.pgh.pa.us> <1144201.1704484954@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1144201.1704484954@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Jan 05, 2024 at 03:02:34PM -0500, Tom Lane wrote: > On further reflection, there is a very good reason why it's done like > that. Because pg_upgrade is doing schema-only dump and restore, > there's next to no opportunity for parallelism within either pg_dump > or pg_restore. There's no data-loading steps, and there's no > index-building either, so the time-consuming stuff that could be > parallelized just isn't happening in pg_upgrade's usage. > > Now it's true that my 0003 patch moves the needle a little bit: > since it makes BLOB creation (as opposed to loading) parallelizable, > there'd be some hope for parallel pg_restore doing something useful in > a database with very many blobs. But it makes no sense to remove the > existing cross-database parallelism in pursuit of that; you'd make > many more people unhappy than happy. I assume the concern is that we'd end up multiplying the effective number of workers if we parallelized both in-database and cross-database? Would it be sufficient to make those separately configurable with a note about the multiplicative effects of setting both? I think it'd be unfortunate if pg_upgrade completely missed out on this improvement. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com