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.94.2) (envelope-from ) id 1qaqBW-00AVqJ-Nu for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Aug 2023 04:18:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qaqBU-002gth-AR for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Aug 2023 04:18:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qaqBT-002gqj-Tf for pgsql-hackers@lists.postgresql.org; Tue, 29 Aug 2023 04:18:31 +0000 Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qaqBM-001fCF-QQ for pgsql-hackers@postgresql.org; Tue, 29 Aug 2023 04:18:31 +0000 Received: by mail-ot1-x329.google.com with SMTP id 46e09a7af769-6bd04558784so3064671a34.3 for ; Mon, 28 Aug 2023 21:18:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693282703; x=1693887503; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HjcarqyWj6HC3Ph5fS+hzVREQc6ncoFFt5BlFhGNkLk=; b=lEMNkrpEl5XwyLBm+dg4khgfBt8dJNa20+b1HO3LBfEGrrPz5QjZ52e5QZQtpqk5cv nqEYJixJwr+0RFpWgOid/9PecPO3hVi0EZoCkLKLTAdTcEGoJlflxL0aFn1UdAloys7q 8Ylr+FjKhGGmutMXHSwPmhZj2V15SiNaaqCDsuQKW+PJ1ZErKBiCtzTI/H8oU6PaUbme SoS00jVdp8PlRgrqVt/tHZs5BPfyS7oGwz/4VB2+7fkOI1z58tu/aidYUbwnlSKjPhRt 7s0SOKo57XXh0DyW3IE06JKUK/bYRx1Wuk5buWOgi36uSAOIwwMzRdkylkGBoT+ZWPAO NAxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693282703; x=1693887503; h=content-transfer-encoding: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=HjcarqyWj6HC3Ph5fS+hzVREQc6ncoFFt5BlFhGNkLk=; b=W+yXhTrFEStJod5m2ShnH6aKkDs99RyTsn9Agrh1RolVCj9dUDJWxu05x0qLRxnNWG IYHaOjNnEwFzmvhWpBS5WBRujpROa29sdRksgIM4wfqojEhOiXxZTwxgQ5qR5fbipjmj YOzQ5wYz8ZkJUdR5VCzA5lIFgUZI0mD8jvxtu3Od8p6Jb4Uf4IVe+Oi7MoHyO7IZmCXk /G4rCEQ/yMF51cB4K8/o+5AUZjwAT9kBTGc8/mHFvDVQxN1VbgeqwVbyjYHwvB8qZIzY hITfKvAOxaxhxomLULhXlVG5yhPOucJ6wLbPeWDe1O7eRgh/LzruuLiFbMibfYgA4dAC oStw== X-Gm-Message-State: AOJu0Yyp9TKhb/xT7zCLPg+suXFJ9hwOq5CRgr0hnTynBqhiiJK/x4wy O99CD8swF3JwiGhSgbs+lYCtBO4C5kEIUtEZAlJSaBvErlM= X-Google-Smtp-Source: AGHT+IENctC5laKDLlDwhN8r9QquFqGNFxIeE/lLAPBP7P0nVdV3gC1YVtrEplOobQHImTec9O3OlNrVut543pQAWy8= X-Received: by 2002:a05:6870:548e:b0:1cc:eec8:c44a with SMTP id f14-20020a056870548e00b001cceec8c44amr16004616oan.24.1693282702710; Mon, 28 Aug 2023 21:18:22 -0700 (PDT) MIME-Version: 1.0 References: <20230824075044.cn4slf6wgvkpdc7f@alvherre.pgsql> In-Reply-To: From: Amit Kapila Date: Tue, 29 Aug 2023 09:48:11 +0530 Message-ID: Subject: Re: subscription/015_stream sometimes breaks To: Peter Smith Cc: Alvaro Herrera , "Zhijie Hou (Fujitsu)" , Thomas Munro , pgsql-hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Aug 28, 2023 at 5:35=E2=80=AFAM Peter Smith = wrote: > > On Fri, Aug 25, 2023 at 8:15=E2=80=AFPM Amit Kapila wrote: > > IMO there are inconsistencies in the second patch that was pushed. > > 1. In the am_xxx functions, why is there Assert 'in_use' only for the > APPLY / PARALLEL_APPLY workers but not for TABLESYNC workers? > > 2. In the am_xxx functions there is now Assert 'in_use', so why are we > still using macros to check again what we already asserted is not > possible? (Or, if the checking overkill was a deliberate choice then > why is there no isLeaderApplyWorker macro?) > > ~ > > PSA a small patch to address these. > I find your suggestions reasonable. Alvaro, do you have any comments? --=20 With Regards, Amit Kapila.