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 1s7L8A-0058tK-Rl for pgsql-hackers@arkaria.postgresql.org; Wed, 15 May 2024 20:21: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 1s7L8A-006oeN-0R for pgsql-hackers@arkaria.postgresql.org; Wed, 15 May 2024 20:21:42 +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 1s7L89-006oeE-ND for pgsql-hackers@lists.postgresql.org; Wed, 15 May 2024 20:21:41 +0000 Received: from mail-io1-xd36.google.com ([2607:f8b0:4864:20::d36]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s7L87-000NvQ-8v for pgsql-hackers@lists.postgresql.org; Wed, 15 May 2024 20:21:40 +0000 Received: by mail-io1-xd36.google.com with SMTP id ca18e2360f4ac-7d9480d96bdso357602139f.1 for ; Wed, 15 May 2024 13:21:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715804498; x=1716409298; darn=lists.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=LuxSLm5g1nb1BHA/4XL1PIbWq1SeTtVNSnvIlRhKeco=; b=Iig1cqDLQpDsIY653uX9ftv1OaeWZARt0yLiOQOkZ6EH3tqtIe9mSMohaY2Sheiat2 4eEn2/0cNms2xPsWfXi1Fhs4WtuoWmJl982ZR6Aaggz8iTdVrfYhvNSiXeDZAnRyKSqb rc1Jax9G3jCVpvX0Iil380WX5M0CT78zN47J8P1FH744uGmzGRZ2Q9TEJQLxx7ElAK83 t5ZVc0glVNSfKFKkbd20E7S2cuTohJApMNiHzdrJvHsIH//s6IeYlBhySi9TndpL8qGv 5z0f+yGgLZSPlobJxN1vxJFW69CBaDBAeekCqK8Km1TH7enTXohXMtFaLvO9zcQb5TPW LxIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715804498; x=1716409298; 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=LuxSLm5g1nb1BHA/4XL1PIbWq1SeTtVNSnvIlRhKeco=; b=pY2x3mWab49egJSFeutJAatRt9DqgE+q25L7xdsNSLA380xjOTbXZuFeOn7XkCJQUt lgFASeWiXMaPwmIqn63fZfGI2/ChOVtZBJUNbErstpbXkDVN8N0DATSmFXA0zMRCvLz0 B4n2stes3bgXBt9oj6swM1dF2UiYBDHszDhCFsu9BwjY5Hksqlwfbz7b1aa07gQneD6j 0z3tYnRsRYHgE+BPNgM0R4EpeKWS2FazntVCp7wBOGUTFuONT2wGEILOrIKsrIXc7Z9r 4zoUG2XkJPE4mPpt9fptJ6kLQGP1alk+5eEr3peW9DaQBgXNhn5jjNzDLoSvsoDb0R+G 2eKA== X-Gm-Message-State: AOJu0YyXEsaGN1dgB11VuAdfda9194uRgYJH+ghxixUsyCLkFRlMpPxJ VwmL+poUIFzr1l+tL6mvDmWutHnR2dasIkkr5J6GmWr2MTFtw9BAk0JXHg== X-Google-Smtp-Source: AGHT+IH8ocsHRszO93kt/gApzxKzEmkIi4zEEVOMsX/3YeJPKx3YQnSRjrURiDG2fhalS3PMLKhUrA== X-Received: by 2002:a6b:5007:0:b0:7de:c608:15aa with SMTP id ca18e2360f4ac-7e1b51e35a7mr1837363939f.11.1715804498650; Wed, 15 May 2024 13:21:38 -0700 (PDT) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4893703bedbsm3624128173.53.2024.05.15.13.21.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 13:21:38 -0700 (PDT) Date: Wed, 15 May 2024 15:21:36 -0500 From: Nathan Bossart To: Daniel Gustafsson Cc: PostgreSQL Hackers Subject: Re: More performance improvements for pg_dump in binary upgrade mode Message-ID: <20240515202136.GA1432094@nathanxps13> References: <8F1F1E1D-D17B-4B33-B014-EDBCD15F3F0B@yesql.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8F1F1E1D-D17B-4B33-B014-EDBCD15F3F0B@yesql.se> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, May 15, 2024 at 10:15:13PM +0200, Daniel Gustafsson wrote: > With the typarray caching from the patch attached here added *and* Nathan's > patch from [0] added: > > $ time ./bin/pg_dump --schema-only --quote-all-identifiers --binary-upgrade \ > --format=custom --file a postgres > /dev/null > > real 0m1.566s > user 0m0.309s > sys 0m0.080s > > The combination of these patches thus puts binary uphrade mode almost on par > with a plain dump, which has the potential to make upgrades of large schemas > faster. Parallel-parking this patch with Nathan's in the July CF, just wanted > to type it up while it was fresh in my mind. Nice! I'll plan on taking a closer look at this one. I have a couple other ideas in-flight (e.g., parallelizing the once-in-each-database operations with libpq's asynchronous APIs) that I'm hoping to post soon, too. v18 should have a lot of good stuff for pg_upgrade... -- Nathan Bossart Amazon Web Services: https://aws.amazon.com