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.96) (envelope-from ) id 1vq98V-005R5y-2p for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Feb 2026 12:16:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vq98V-003mvr-0M for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Feb 2026 12:16:03 +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.96) (envelope-from ) id 1vq98U-003mvi-2b for pgsql-hackers@lists.postgresql.org; Wed, 11 Feb 2026 12:16:03 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vq98T-00000000950-1cvt for pgsql-hackers@postgresql.org; Wed, 11 Feb 2026 12:16:03 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4834826e555so29093675e9.2 for ; Wed, 11 Feb 2026 04:16:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770812160; x=1771416960; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=iQ/vZa3YkhXAaU1WIkUXR56/kmw6T5P3yN7U2QnT9aY=; b=QCj37QpSkCDFhO2rXqVfQgpaqpIDlW8n6EpEKFXix5v9PsmoZUKhRoqRJa3gLVCyA3 +o+AnvX/RjKxSYijkPaU/7w39hR7vCniwrnRJOnxoi0x3X8FIRR2l73mITSA9DFAFexo vjXVpxBklnWE2wcwN08N2/jhJy+58ofNTLq4NNWZ7vS10ncDzecFD7I7b3FWOjQF5lp0 lh6FDwKofRxQyGODn9u9O4hJ0RHFwpG/QXrueenmB4GVes6v4HBXcL3GgZoxTApcroTH 6oDudRH67Gd8qJljmCqAa45sRzsZmNmOyjhONMmLCE8rf45wAAvp57s/5wnMWRl5nCv8 rIZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770812160; x=1771416960; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iQ/vZa3YkhXAaU1WIkUXR56/kmw6T5P3yN7U2QnT9aY=; b=YqH6qdyvFhRUb8UyPSlnZ+QfQvPO6J0sb8gqFAZuLzYUUauEeKbLNXfifzS9heIb8I CfMVkGGJDGG8zQomKX18jJZ3KjrjXaqNCjmjqgbnpYK+kWgzixzgo2mzlPpvJHZBjRN+ nf9HUOnoGm48UYnRN3IfDnK5ltkYmPnB2xzKeDK00LuBzXznRs4TnlzvMOvl+GQgmJa1 vkHKKPERzyBH49Gq4wkFB347lOFA46kVCHIOFeQ0haYDmX1XzqVDxUuRbWM+7RoGqAPt 9U7CLJRrRw+nQS98XlbqT06M9NzUOx+yG8lmSNVvqocL6ZL24fYH9GHK4pTat+HMrqsQ JG7g== X-Gm-Message-State: AOJu0Yx7OvyKeSdmNfGurSAqxkNG8JYB2StyjDkp5p3t7blweddgZ85v fiMRAEhXomi8mMGIGkMdAzKmbr0mlf1s5TyVtz4lPRXVCr6gb+jsCuqhw8+r6Q== X-Gm-Gg: AZuq6aKP79l3buyf+ubTi2NnB2Yvm+jZb/OtkAPmFrZMdwWCZn0Z1Q5xj8euchtOvnG +0CCSHEyXp8fpIZFeQ4rP8bjFGLAea01g7bZURvu1xNanxHrjd1iAXx02RPu0p229Y/Z5RPzAld tl/pFrtq+gVtvLSvi1cHzWzRyoiV0MtWpvWlDzs/EAWDfuYz6Ex46dlEhX8N9jloU2ARvVHWP7G XLVRP6aJ60Y/pRzqKkeyC09qdKKOtAqsfDSpGQQLkefGE9pArdawtWViIIuOobEdIgFpW15xVeU oDRDeBXkS1OBPp96eUAgbwZrTOto3rx+NtCD5ay03lNS0VGbVhYr7FIs9ccckIOpqTbGigevv80 AsGcD4QWA8o4i1YLvcb9hqGrUmN0U/2oDzDFv+mG9Cm20dCw4bozcopzSGU+LseeaEpCJg21osW KKKrHQmXMWEbjBtniJWDxe975CUpq4nqJQW+Htgt1HjUAypFJx/+OXpOX4PqkXjminI4QK0nqAK SpUaEHP X-Received: by 2002:a05:600c:c48e:b0:46e:4b79:551 with SMTP id 5b1f17b1804b1-4835b96e8a8mr33695505e9.31.1770812159580; Wed, 11 Feb 2026 04:15:59 -0800 (PST) Received: from [172.20.10.2] ([148.252.146.43]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4834d82a4afsm244543255e9.11.2026.02.11.04.15.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Feb 2026 04:15:58 -0800 (PST) Message-ID: Date: Wed, 11 Feb 2026 14:15:56 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Propagate XLogFindNextRecord error to callers Content-Language: en-GB To: Anthonin Bonnefoy Cc: PostgreSQL Hackers , Japin Li References: <0cbf5d34-f117-456f-bcc0-50fa9a8eafba@gmail.com> From: Mircea Cadariu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/02/2026 10:43, Anthonin Bonnefoy wrote: > XLogReadRecord may already have consumed errormsg_deferred and set > errormsg. We can't set it to NULL, or that would erase a valid error Indeed. Should we place this initialisation at the top of XLogFindNextRecord, before any processing? At that point, there's nothing to erase. > + /* > + * we may have reported errors due to invalid WAL header, propagate the > + * error message to the caller. > + */ You can consider capitalising. -- Thanks, Mircea Cadariu