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 1p27ht-0004uX-H5 for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Dec 2022 09:24:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p27hr-0007dV-TR for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Dec 2022 09:24:11 +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 1p27hr-0007dL-Ir for pgsql-hackers@lists.postgresql.org; Mon, 05 Dec 2022 09:24:11 +0000 Received: from mail-yw1-x1135.google.com ([2607:f8b0:4864:20::1135]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p27hp-00088v-D8 for pgsql-hackers@lists.postgresql.org; Mon, 05 Dec 2022 09:24:10 +0000 Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-3f15a6f72d0so5809037b3.1 for ; Mon, 05 Dec 2022 01:24:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=69RMbf9T9pDaAT8zQGnIEr+sOWrtKIeWDMefdGbK1zc=; b=p69/EP1vzJwrAslG6vM8m8iVziDrMfvAdM31E3vns2pauJnb/3aQenewwjBnJY9aac 5OkVU/t5Fc1WS0CPwot9ED8EXEVMGn4FxcoPbwTbGlpJY4N+a24RFv2wO39k2rJP6tMp JRc04DUVvvuRdg4H6krprftRqkuPGnaRrSs+I8C9C6AQTCy5G0y2F7JPi5k0k0WWgoAD 2n+HJku+t5zMn7bCIS1AAmA8D+VrkyrFZwWFCh/yEQ9zLebjl6uTaaj2UASQRFw6SMIL 1yQsdM/XP6jeeXLlPbWDrJHLpq7iNBl+pvzHgGBm8irMKO/P7iN74sTQ4/siMMmn5keB lJaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=69RMbf9T9pDaAT8zQGnIEr+sOWrtKIeWDMefdGbK1zc=; b=zJUKII9op1uVGXDb0uhmi183FFTEQLCMNbmT10wQvuNfikZUem+EfM4qkG2syeZgOW hPZXm4s7Ij9/xSFoqn6sX1MTXVHrPOujms9Bd/zfqpMpWj4nW+Di/DnmvIRoih8sjA+4 2dgR6VgQZGdaP5hnt9lskdA6DblYs2NdpC46o6wYnZeW7Thvw01TxMyCN4DKUQx42mAP jGHG1ccg6V8MlqCjkK2AIa+TjeDCEddO+/bmvaj1fGKltyqnec/VCEKvJqxkgFcDT4e8 S3ocEoJw/BalMWnRn9ZDkI7M10efZ3LUbMcZwezcqsmTJQkrkX+yEHMu3BzVju6PEnl9 8nRg== X-Gm-Message-State: ANoB5png0usNDcJyNdyRwNYBXLRbpmRJFQGzPO6LDEgc/CIjOqAM+3cS w0+Cl265KibHDDFKN4bIna5RBKocys+Cil/6A4s= X-Google-Smtp-Source: AA0mqf5uA+c+DrlToH4TpUkXJukjMu85gkjuvkrwxY2JJhVS8WXtK9P+6u9P/Nl4i+iD7hgBn8ex2S5GriPC+EEDPwM= X-Received: by 2002:a81:c06:0:b0:369:2b5e:a73b with SMTP id 6-20020a810c06000000b003692b5ea73bmr11394475ywm.404.1670232248434; Mon, 05 Dec 2022 01:24:08 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Mon, 5 Dec 2022 14:53:56 +0530 Message-ID: Subject: Re: Perform streaming logical transactions by background workers and parallel apply To: "houzj.fnst@fujitsu.com" Cc: Peter Smith , Masahiko Sawada , "wangw.fnst@fujitsu.com" , Dilip Kumar , "shiy.fnst@fujitsu.com" , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Dec 4, 2022 at 4:48 PM houzj.fnst@fujitsu.com wrote: > > On Friday, December 2, 2022 4:59 PM Peter Smith wrote: > > > > > ~~~ > > > > 12. pa_clean_subtrans > > > > +/* Reset the list that maintains subtransactions. */ void > > +pa_clean_subtrans(void) > > +{ > > + subxactlist = NIL; > > +} > > > > Maybe a more informative function name would be pa_reset_subxactlist()? > > I thought the current name is more consistent with pa_start_subtrans. > Then how about changing the name to pg_reset_subtrans()? > > > > > 21. apply_worker_clean_exit > > > > I wasn't sure if calling this a 'clean' exit meant anything much. > > > > How about: > > - apply_worker_proc_exit, or > > - apply_worker_exit > > I thought the clean means the exit number is 0(proc_exit(0)) and is > not due to any ERROR, I am not sure If proc_exit or exit is better. > > I have addressed other comments in the new version patch. > +1 for apply_worker_exit. One minor suggestion for a recent change in v56-0001*: /* - * A hash table used to cache streaming transactions being applied and the - * parallel application workers required to apply transactions. + * A hash table used to cache the state of streaming transactions being + * applied by the parallel apply workers. */ static HTAB *ParallelApplyTxnHash = NULL; -- With Regards, Amit Kapila.