Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8yt1-0000HI-Hk for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Jul 2022 06:51:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o8yt0-0005C9-DA for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Jul 2022 06:51:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8ysz-0005C0-2h for pgsql-hackers@lists.postgresql.org; Wed, 06 Jul 2022 06:51:46 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8ysw-0006pa-7Z for pgsql-hackers@postgresql.org; Wed, 06 Jul 2022 06:51:44 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id AFDC75C0105; Wed, 6 Jul 2022 02:51:40 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 06 Jul 2022 02:51:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1657090300; x= 1657176700; bh=A00AgyWv9UPWmLzSHsQ31XeK76NhOwTXQ0X3YXkpPF8=; b=N sNsUCzIE8eVMKFly/p5d1CjxKF43euS38KQxn1kUQrggHPNQVkKmsJffqeMKQU/1 e5qmyAyOy4uzHsGt7lMO3rdcZXQ9j0rTRJcux0PREKR6C9G/KAO3cMWraQHsTE2T UXPh+pU8oTI9OfRJY7BQUnxx38brn+M05bnPal/1jOHZeVuI8EXW5CQuq5T2CT79 jfjajENN1jgeLXtfo6pnaLq9J4IkDONe4QjCx5I0+WcbmwZmM/4edHMAWPxnoOI4 uXWyg7/DzSu9evVSm2ZwIpsxnwEaoHT0xavsHd3WvfTIm7N9N7C6IqHQuD0O2gJq bOCd/uAdO8yvAW/5rOO0A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudeivddguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgv thgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnh htvghrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepheelffeggedujeet iefhleetuddvieffhfffvdejvdffgeejkeduleduheduieefnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgr uhhtsegvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Jul 2022 02:51:38 -0400 (EDT) Message-ID: <4b856bab-c37b-559e-1ab6-68f189146013@enterprisedb.com> Date: Wed, 6 Jul 2022 08:51:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: refactor some protocol message sending in walsender and basebackup Content-Language: en-US To: Nathan Bossart Cc: pgsql-hackers References: <7e4fdbdc-699c-4cd0-115d-fb78a957fc22@enterprisedb.com> <20220701213646.GA582729@nathanxps13> From: Peter Eisentraut In-Reply-To: <20220701213646.GA582729@nathanxps13> 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 01.07.22 23:36, Nathan Bossart wrote: > On Thu, Jun 23, 2022 at 04:36:36PM +0200, Peter Eisentraut wrote: >> Some places in walsender.c and basebackup_copy.c open-code the sending of >> RowDescription and DataRow protocol messages. But there are already more >> compact and robust solutions available for this, using DestRemoteSimple and >> associated machinery, already in use in walsender.c. >> >> The attached patches 0001 and 0002 are tiny bug fixes I found during this. >> >> Patches 0003 and 0004 are the main refactorings. They should probably be >> combined into one patch eventually, but this way the treatment of >> RowDescription and DataRow is presented separately. > > All 4 patches look reasonable to me. All committed now, thanks. (I cleaned up the 0004 patch a bit more; there was some junk left in the posted patch.)