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 1rxTCZ-008xST-FH for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Apr 2024 14:57:27 +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 1rxTCX-005n4T-S1 for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Apr 2024 14:57:25 +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 1rxTCX-005n4L-Ib for pgsql-hackers@lists.postgresql.org; Thu, 18 Apr 2024 14:57:25 +0000 Received: from mail-oa1-x2b.google.com ([2001:4860:4864:20::2b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rxTCU-001e4X-Ne for pgsql-hackers@postgresql.org; Thu, 18 Apr 2024 14:57:24 +0000 Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-238e171b118so583422fac.3 for ; Thu, 18 Apr 2024 07:57:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713452241; x=1714057041; 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=XXYEvWNMYcdool5uBcdO7Kt3xqs7bxeOo2on0yYmKic=; b=YKeE8lEAgoNQNQmSLXU7kreS9UmnBsEQ8qRXO0jcdd9dNUSFM3ZW9+m/8OK/KZc4XT 0oWiUm5rBaq8O8cNsxrCeaaMO5U3ufJOvhAS5UQcBFjlUyGJBXXofqugl9+yGQ0KZdDZ R2LfM3TQPA2yApABHBpqf1DsV1B7ApTCBS1saL8VSVhoz/5mihcv5QXKDZNNvF2P9km7 3WMAV0MF2g46QRlW3XyDxD8eZKrC9Mu/tynYp9VrwlcOXMuHfL9AvkmQVUmMaEq7PT2x qc+cbFBkhMDwoETHfArqC/qxY/pJ459tnMvdVI6L6NjOPAu7DxH9LWUN5k77/H5FCY3O CIpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713452241; x=1714057041; 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=XXYEvWNMYcdool5uBcdO7Kt3xqs7bxeOo2on0yYmKic=; b=EoLI33tZZ4MypRYWEvOL763PIw8y6CJl2ynvIqSGYO9YCBPVrZU9WwrKUt1p9w+MCB 6QhNHjEx4FIk+fGRqrBWUFtdswOI9IitQUYY8JJ5v+Rx3rUQBCHaYA2pPYsAf4lIbovh IoIZbaca4tJv/HxMBBHS0HQxV4O5X6NUumJIGGdf92FI0O5wAnvjaNQx5RflVhmmRcE3 as6yres9eJXVaZfCPH+8MJGgOdD+M+Kv4rslB0fRovxS5YeQJaqZNYQ/sB+GBNv4Uy/3 DGUNiBjbY2FohXU7MdmsLRdvfeF2wqWbujgkuexNGYgLxjbfWnoq4ikQby9OrMbU5HhO WiLA== X-Gm-Message-State: AOJu0YwnsvGRIJGKwg6KMlxE0gOqzSzMp4Pn8Ow47kgxX8N2b2CBZfAW Gy6onR/52dHTICsV/ENcAh03NECkkUEF1w/1cDtDZ5bG6Iy/MqXZ X-Google-Smtp-Source: AGHT+IEnXZmscRY8KOiKaPIPeQwmjfkgMaikNGYATrzGFVz0oNoRwZN7vizGzyjeyytNsyQRA3M8RA== X-Received: by 2002:a05:6870:1705:b0:233:55b8:edf1 with SMTP id h5-20020a056870170500b0023355b8edf1mr3660843oae.8.1713452240985; Thu, 18 Apr 2024 07:57:20 -0700 (PDT) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id du12-20020a056638604c00b00476e55d3ca3sm457192jab.140.2024.04.18.07.57.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 07:57:20 -0700 (PDT) Date: Thu, 18 Apr 2024 09:57:18 -0500 From: Nathan Bossart To: Corey Huinker Cc: pgsql-hackers@postgresql.org Subject: Re: improve performance of pg_dump --binary-upgrade Message-ID: <20240418145718.GA3501884@nathanxps13> References: <20240418041712.GA3441570@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Apr 18, 2024 at 02:08:28AM -0400, Corey Huinker wrote: > Bar-napkin math tells me in a worst-case architecture and braindead byte > alignment, we'd burn 64 bytes per struct, so the 100K tables cited would be > about 6.25MB of memory. That doesn't seem too terrible. > The obvious low-memory alternative would be to make a prepared statement, > though that does nothing to cut down on the roundtrips. > > I think this is a good trade off. Cool. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com