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 1pFvQy-0001TW-1Y for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Jan 2023 11:07:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pFvQw-0004r5-VE for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Jan 2023 11:07:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pFvQw-0004pw-Ir for pgsql-hackers@lists.postgresql.org; Thu, 12 Jan 2023 11:07:46 +0000 Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pFvQu-0002UV-ES for pgsql-hackers@lists.postgresql.org; Thu, 12 Jan 2023 11:07:46 +0000 Received: by mail-ot1-x32f.google.com with SMTP id r2-20020a9d7cc2000000b006718a7f7fbaso10375671otn.2 for ; Thu, 12 Jan 2023 03:07:44 -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=vTWwayajFgGDfM4U4E80Y3+Ngc+0WA4zL8/9tZ+rk+4=; b=ojXT4hvWf2xOxg3CntgQ6YXtXf4xJT/ghqcZN1kiHY2Z+E3HuAyAwy1XT+GuXwTVD8 lV5L7RI5wlKxjzdRUWGQApjN7l9qSirRsOBTNSjp1xg3/KNZ7qtiIDhamCm/mmQnRym+ C0q7x00iKnoek2d3RAn9BAi4yCPnWlEqNdPsMOnlx/xuxuL6xG6BZvr9uPmq0xLfq/Iy x6kAhB+UODuuMS1q9/6FXU8Tfha9dd8TFAZpdKDCZxmxMs2AoCsTi93HyPTAVC6WB1nB dMhWDhJ5AxEtBc9s1AolR6yMk2c6355ZfaeTPCGpWPjwjtSvM9WRxkidB9PgtVRoZeGU pM7Q== 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=vTWwayajFgGDfM4U4E80Y3+Ngc+0WA4zL8/9tZ+rk+4=; b=kL1nyndSPq/OhhqaK/B6nLMErAuWDAh8buDG8SnEosLJYB0EyQLfAD+9dmw328VeJ1 tV+BjIIu2fg6nLanOq/LV+VuFLoTZzqqWbEFarFKdZr4Rvltmc+OvUPNYK6ojOgHvxnK vJHuifZ2kg6B/AbBLIMButkdlSUNhRQ5EiSD2Ee85o/xofvuzMwxYdM1MKGCfFl+6onQ yxNigXwv6Ux4rclHb3nCo1X9RWifdY6SqntTeeNqoRJdtOqDfzgpIk/fmnT0I2fYvhOJ rW9oTpWMva7Je59/1LCowlDH7ErfQw1kkuAPD2sIo8WOmKv3td8F38W8Zd6KeLA5yFN8 dZ9A== X-Gm-Message-State: AFqh2kqLU8RM2qIJLWg8Szq2zaRqN0z4bdYJ0wp7efTpc2RrV4jzB3lZ 5YwVMxevHdRPKw6l4aixZegqdeXyN67FFvV5nig= X-Google-Smtp-Source: AMrXdXu+1+g2BCQjWPs0tJkCfXmZVkJ8985UPs1+KHanRJHXg4mAmTPvbW4aVIVvhL8hDTw80uQwKDDblgpzPi6WMEA= X-Received: by 2002:a05:6830:3749:b0:66c:4ed7:fea9 with SMTP id bm9-20020a056830374900b0066c4ed7fea9mr4650773otb.57.1673521662411; Thu, 12 Jan 2023 03:07:42 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Thu, 12 Jan 2023 16:37:30 +0530 Message-ID: Subject: Re: Perform streaming logical transactions by background workers and parallel apply To: shveta malik Cc: Peter Smith , "houzj.fnst@fujitsu.com" , Masahiko Sawada , "wangw.fnst@fujitsu.com" , "shiy.fnst@fujitsu.com" , PostgreSQL Hackers , Dilip Kumar Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jan 12, 2023 at 4:21 PM shveta malik wrote: > > On Thu, Jan 12, 2023 at 10:34 AM Amit Kapila wrote: > > > > On Thu, Jan 12, 2023 at 9:54 AM Peter Smith wrote: > > > > > > > > > doc/src/sgml/monitoring.sgml > > > > > > 5. pg_stat_subscription > > > > > > @@ -3198,11 +3198,22 @@ SELECT pid, wait_event_type, wait_event FROM > > > pg_stat_activity WHERE wait_event i > > > > > > > > > > > > + apply_leader_pid integer > > > + > > > + > > > + Process ID of the leader apply worker, if this process is a apply > > > + parallel worker. NULL if this process is a leader apply worker or a > > > + synchronization worker. > > > + > > > + > > > + > > > + > > > + > > > relid oid > > > > > > > > > OID of the relation that the worker is synchronizing; null for the > > > - main apply worker > > > + main apply worker and the parallel apply worker > > > > > > > > > > > > 5a. > > > > > > (Same as general comment #1 about terminology) > > > > > > "apply_leader_pid" --> "leader_apply_pid" > > > > > > > How about naming this as just leader_pid? I think it could be helpful > > in the future if we decide to parallelize initial sync (aka parallel > > copy) because then we could use this for the leader PID of parallel > > sync workers as well. > > > > -- > > I still prefer leader_apply_pid. > leader_pid does not tell which 'operation' it belongs to. 'apply' > gives the clarity that it is apply related process. > But then do you suggest that tomorrow if we allow parallel sync workers then we have a separate column leader_sync_pid? I think that doesn't sound like a good idea and moreover one can refer to docs for clarification. -- With Regards, Amit Kapila.