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 1rhpSj-00DZkz-NS for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Mar 2024 11:29:30 +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 1rhpSh-009Ios-AY for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Mar 2024 11:29:27 +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 1rhpSg-009In8-E0 for pgsql-hackers@lists.postgresql.org; Wed, 06 Mar 2024 11:29:27 +0000 Received: from wfhigh7-smtp.messagingengine.com ([64.147.123.158]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rhpSd-0034ii-MB for pgsql-hackers@lists.postgresql.org; Wed, 06 Mar 2024 11:29:26 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.west.internal (Postfix) with ESMTP id 3055618000C0; Wed, 6 Mar 2024 06:29:21 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 06 Mar 2024 06:29:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1709724560; x= 1709810960; bh=J+yj0UtQKeYZYFInfccfHYhzK/nQoLyKzFfIbknrxQ8=; b=r iEfITPaOMd7OZ+4hQmXOtD9qu43Zp3DkjhCnzgMuueHUqy/yUsww/9RGgvZt79Xt d/VYzJcAk24jBtsLgTlp3b8+j0V5ZwEpB0u1Mv5QlnTdbu+guAPfIZjXF6DTaSzp 8bp7QaS/qayelvGQwUicrw4n373XlG4kmmyuBbt59mFysYObzaQzVef2Hoa9cmd3 64NXGD4dVjyx5sI2uiASweW9eXVWthJ0Gs2mrFHeBE6JBKwGOQY5CCuTg+q1DXhn fPAymD45TiJyq9slhxwdtTP+3mJE1bZz03T4IHtHx3Q6lWUwoXud8DeG69F626WJ 49QC7X3gyqp3LYXS2koOA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledriedugddviecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpeeuiefgffeukedtgfetueeugfetvdeuhefgheelfeehleej leefffejtddtkedvjeenucffohhmrghinhepphhoshhtghhrrdgvshdpvghnthgvrhhprh hishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Mar 2024 06:29:20 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1709724558; bh=75L3vffbuRqQuyYkjhl3Wcu4dqvtyPZVaX40l1IyWzc=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=YLgfzzkVpiouIvbGPMMAnTHO+Vsjvi0PgBD8pbNh++sXdYkS/OM+Bibu/iyXZPrNi X72JI56JeskAS6rsjl0ED5QDlQysPpaLopU1QhzULYWvTXWBJNhvqX+Az8uqFNCF2y R5EqHscT8WEJVZDqugHhnHEHJEAojpxEtZHbNBDOPd8oUk0NHtIk+U4EcOAbT/6Q9l flE2SnuJ0ESzjLuQ9K9vgiseDIQeMllVTGGGbBwcP+1qIgGXn7wgdYrk7uhpvBFWhq bie0rStcbCPOM/tgPdVe5pAG4Vy7dhwVY/NjwN1remlwCucW6eYNw3LZz5IGGhFBxf R44vhVdeKs5Cw== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 23A97CD5; Wed, 6 Mar 2024 12:29:18 +0100 (CET) Date: Wed, 6 Mar 2024 12:29:18 +0100 From: Alvaro Herrera To: Thomas Munro Cc: PostgreSQL Hackers , Robert Haas Subject: Re: Potential stack overflow in incremental base backup Message-ID: <202403061129.gnbmxwwn5lem@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2024-Mar-06, Thomas Munro wrote: > Even on the heap, 16GB is too much to assume we can allocate during a > base backup. I don't claim that's a real-world problem for > incremental backup right now in master, because I don't have any > evidence that anyone ever really uses --with-segsize (do they?), but > if we make it an initdb option it will be more popular and this will > become a problem. Hmm. Would it work to use a radix tree from the patchset at https://postgr.es/m/CANWCAZb43ZNRK03bzftnVRAfHzNGzH26sjc0Ep-sj8+w20VzSg@mail.gmail.com ? -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "E pur si muove" (Galileo Galilei)