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 1wA6qs-0024TX-22 for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Apr 2026 13:52:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wA6qr-000Gs5-0G for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Apr 2026 13:52:21 +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.96) (envelope-from ) id 1wA6qq-000Grx-2I for pgsql-hackers@lists.postgresql.org; Tue, 07 Apr 2026 13:52:21 +0000 Received: from mail-dl1-x1234.google.com ([2607:f8b0:4864:20::1234]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wA6qp-000000012e1-0R2n for pgsql-hackers@postgresql.org; Tue, 07 Apr 2026 13:52:20 +0000 Received: by mail-dl1-x1234.google.com with SMTP id a92af1059eb24-12c0b72dac7so2568686c88.0 for ; Tue, 07 Apr 2026 06:52:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775569938; x=1776174738; darn=postgresql.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=j9t1IbYg/muAKw+2AEVX9xlyFgXOzBiN/oH7I0ZaBbY=; b=eokP+3l0IABof3KCG4z2TlpNanH5n6J5+xQELtkvH/ncILZHeD4BSfpMN0YeDpjJXh 7nPeC990ULk2YQJPUu/SNsZuEP5WKpOfCXv31eXHXH7GPnugzmAdG3EMPTjq+/i/Esfi r9g1xrgbcxlLA7JWmsDnhiAak/3A1ztclqsjfauUzFmOgmWmtZrXJP7rf4orzDpL/2f0 Qd5hbLy4yWtCv+eorJk6UKczTcAvrAFQ/ZXOFCIfJy9tIj3MfU5/0mXdlc9kWab+n83R eHr71iF1OyWmRlMvvuz0juCGLj48YaoDZyyAPvik+alR1dCvITHoJ92M3lof6iv31uDQ s2zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775569938; x=1776174738; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=j9t1IbYg/muAKw+2AEVX9xlyFgXOzBiN/oH7I0ZaBbY=; b=Hj//+MlgkXgGuhzeowgDnPW0E/UyjSQeG5II23erzcW0YXf90LO/sDhxrn7PvmWqQi khvUWlDbDqVx1LY9kWpJzMlvbgsspONxhejUC2fRJRTMw/XqF6akyqkcYm1QJ5kw4j8M KZlI4ATy17g0D1LYBCtr7QLs+ZpT8tNO+VGUrSVSDyoB5RZuJMjcacnGFvzG4ZatnSBz 0NnBM96kcphRrm6k/dcOcczKjz9wkX+EZ/XquZqgpoow5SAwZckvj/5v4N2DHgcuNkZk qFLwuGJur8QHAHRLNDlcKMM9sCRbK6LIqZnNYjn2Fj8m5fkDpNTRRXsrfNdkY6o3AVBp PBRA== X-Forwarded-Encrypted: i=1; AJvYcCV4KgNPJs30+Uz+pOYkAK3311T0/Cokv6coby9OS0TMScMeTuSZEn502Q2XEp2KhcYVcs9TgtawfV0UKwg7@postgresql.org X-Gm-Message-State: AOJu0Yw93iuq/F2BFsHtFeImZ8o8S/UQsbCxid0hAE9H+mcZzRrAJAIV ipMCKJ1bA5GXREd3IFYAn5A+Do+TpXZr42RVNn3+XA9l6uxru0Ad9tAv X-Gm-Gg: AeBDievKXfkvhcVYvm8cvaK8is94D5G7ZKuKn/rrsHbB7KSCpuiqIv27mSHn7m5zyvY 9tK9M31P8DyzV8TY0JKnnYk+N+aG6PNil2zU6cmW6AYiu9CqRKtD3BzwLJEDmmjlkt1qYudUfku Bm9fM/1NWRw+TsWrNpyD/7dWJdV/AqGwRx9uyPHleMb2QoRKa+swg+LiJ0BIoBchAeQfXo44STE Bhlujwtmag4qPfJZ+4dolmxMXqtD/ASoNjwGEGNvmCuC6xkKyZ0L6dNbOCGwLLRxio1xeRlRD/w USif28+KLL/xu8EG2dugriui5auHXnQME9irPHDJeX6fvm23ZEyLMtDnRjg1JZyYhe7mO4HZmtl JV3FrVByL0NhcLLJeLwnfrO3Uti7Jxob+MrD921QbdycdEFrGwtqPDJYunT4nBJOEooh6SoM6kF KGRlS77Pg8quTtlQPtdoTgPBviBsD0ZF84BMZdDBdoKcHGcg== X-Received: by 2002:a05:7022:6613:b0:12a:7181:2f1a with SMTP id a92af1059eb24-12bfb6ec537mr8352595c88.5.1775569938154; Tue, 07 Apr 2026 06:52:18 -0700 (PDT) Received: from localhost ([2804:14d:328a:a59c:ecba:fcaa:a831:c445]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-12bf90973b6sm16183538c88.9.2026.04.07.06.52.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Apr 2026 06:52:17 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 07 Apr 2026 10:52:14 -0300 Message-Id: Cc: "Alexander Pyhalov" , "Pgsql Hackers" Subject: Re: Asynchronous MergeAppend From: "Matheus Alcantara" To: "Alexander Korotkov" X-Mailer: aerc 0.21.0 References: <59be194c5a409fb9fc9f2031581b8a44@postgrespro.ru> <2fb1d9923b6995492e7b163e6cb95402@postgrespro.ru> <782a968c8e01ec6db3b2da2120adf73b@postgrespro.ru> <554a73f7ffea8b22b3f81a4804b5fc34@postgrespro.ru> <42a9a941-e768-4fd8-8067-12958c5a1d70@gmail.com> In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon Apr 6, 2026 at 9:19 PM -03, Alexander Korotkov wrote: >> Minor comment on 0005: >> >> +static void >> +ExecMergeAppendAsyncGetNext(MergeAppendState *node, int mplan) >> +{ >> + /* >> + * All initial async requests were fired by ExecAppendBaseAsyncB= egin. >> >> Wondering if we should reference ExecMergeAppendAsyncBegin() instead of >> ExecAppendBaseAsyncBegin() since this is on nodeMergeAppend, what do you >> think? > > Technically current comment is correct, because async requests are > essetially fired by ExecAppendBaseAsyncBegin(). But yes, since we're > on nodeMergeAppend, it would be less confusing to mention > ExecMergeAppendAsyncBegin(). Fixed. > Thanks for the updated version. I did another round of review and testing and it looks good to me, I did not find any issue or strange behaviour. With the refactor the async support for MergeAppend is not too complicated. My main concern on this patch series is about the refactor itself, if we are missing something or changing some behaviour without notice, however as the async/sync Append execution is also using the refactored code and we have a good code coveraged I fell a bit confident that we are right here. -- Matheus Alcantara EDB: https://www.enterprisedb.com