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 1pE1A7-0008Mz-5V for pgsql-hackers@arkaria.postgresql.org; Sat, 07 Jan 2023 04:50:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pE1A4-0002WZ-SK for pgsql-hackers@arkaria.postgresql.org; Sat, 07 Jan 2023 04:50:28 +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 1pE1A4-0002UO-Go for pgsql-hackers@lists.postgresql.org; Sat, 07 Jan 2023 04:50:28 +0000 Received: from mail-yw1-x112c.google.com ([2607:f8b0:4864:20::112c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pE19x-0004ll-Db for pgsql-hackers@lists.postgresql.org; Sat, 07 Jan 2023 04:50:28 +0000 Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-4c186ff0506so47851767b3.6 for ; Fri, 06 Jan 2023 20:50:20 -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=om3MaYZ3Y19XZcAUf/7YgexJ7UR2/wM8SMldWVWlBgc=; b=PJ3Q+v41AgR2zrNaNX78BgjuwR3iZeBu2PCs4UCT7e0zXo8cbi6mojZ/OXezBPacE4 dnrZ5nP9OeSFpXs0p92szzE3fOaHGg14ARB7wsrN89b5GOSh/QldAarswIacqfqZ55p9 cgdqK5F4t5ZPqycfgf4DFGmTrHXorH0GzDK0Qhv4+64GaiwK+okNNXYPytFkOZ0EsClH wdXKsO47umj4VujMfEYWbYcu1ahGPsED3wVNPLk0AJxj420WGUUnu0yJYXw+fF0f3jmO +LIz9hv2XrGlENC5sIo2aHLlPbMXKSkCu9QkFXqwXpA1eK1cBxGBwctsxGexZxse7aug w17A== 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=om3MaYZ3Y19XZcAUf/7YgexJ7UR2/wM8SMldWVWlBgc=; b=4ekJ/+0ShA2c3jfmRJuc24OUQQPyThewUhLdtXkVxLxsxKRtlvBN+/2V99flHDRJlN PHtFiSQptxK+bSHu/tsjDF8yGDv4OoEZaKNV7jv5RoFE+kn2Dkx6I5BfenIJV/S1N4jD BvOhkE+mCNZLa3tTfHo34uIayca1y6eZBQyDE02BGUDddrE5sCWg58DKe8DZKR8lE8vn cp55zKs2bj9QHoZOH6V8vDCQ8dfWx1tCjN7T5RPMpaVc54m6qad+VozkN7Pf2zFGhH4F rjshVPLnl34eES0YCgrGLr+MdkSqf+HWcuYrj8N+5phvDCLK10tCzzyeyaUmv0ZVpJPQ TTYw== X-Gm-Message-State: AFqh2ko+5agjxbxADkubVuxfpr7wjkpBpw5+4r92urHdhLbXORY5ZGI+ +fSt+wLViQmxEQ3giIfAPEGKmxCtEZw2y/yPdnCCmDIyX3o= X-Google-Smtp-Source: AMrXdXv185Cti23kMWlyp8VMdSt6D9X8HkLYW3bOyGy/+M08xKkUx7UFMxkhh3wjCLutiGhS7HOxO/o3h7eQcFM2yi4= X-Received: by 2002:a81:6c41:0:b0:41e:cd7:4e85 with SMTP id h62-20020a816c41000000b0041e0cd74e85mr423877ywc.229.1673067019495; Fri, 06 Jan 2023 20:50:19 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Dilip Kumar Date: Sat, 7 Jan 2023 10:20:02 +0530 Message-ID: Subject: Re: Perform streaming logical transactions by background workers and parallel apply To: "houzj.fnst@fujitsu.com" Cc: Amit Kapila , Masahiko Sawada , "wangw.fnst@fujitsu.com" , Peter Smith , "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 Fri, Jan 6, 2023 at 3:38 PM houzj.fnst@fujitsu.com wrote: > Looks good, but I feel in pa_process_spooled_messages_if_required() function after getting the filestate the first check should be if (filestate== FS_EMPTY) return false. I mean why to process through all the states if it is empty and we can directly exit. It is not a big deal so if you prefer the way it is then I have no objection to it. -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com