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 1pKMre-00012p-G3 for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Jan 2023 17:13:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pKMrc-0006g1-Bz for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Jan 2023 17:13:40 +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 1pKMrc-0006fs-1c for pgsql-hackers@lists.postgresql.org; Tue, 24 Jan 2023 17:13:40 +0000 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pKMrV-0008Ic-Ao for pgsql-hackers@postgresql.org; Tue, 24 Jan 2023 17:13:38 +0000 Received: by mail-pf1-x429.google.com with SMTP id g205so11662400pfb.6 for ; Tue, 24 Jan 2023 09:13:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=8ADO7WArAbqyOHq+ilcpHXkkILz3WpU5uki0MmTLA3s=; b=OTSZE1SC3JMirtcHaombYuILdYSjvQKRiLvHRwfw6xphViUwzi6SxEm+m6PMmkhLUz EHaurbw5kT4Ub4eJArpq1UtwonamdvzW2gJFjGkf0YIiVcPbZKGaIb6WtCfDTzadqV1E 17eew+MAfLEMfvY7DS0PVfTgrFvcMWkgMJjJAWNnwD8w7Ex6DP0Ih/wjUBN1pkXVbqjL yDwgQXuEcQ2G9tXis6kXK5XTEgpZheCBz6g3sWxRgSoTrfU77uLYcWobwGzYNO6cNSYU +wxudWGzWSgyoL0SPOXvYJlTsQI/WCnPvI7/pAvAPYmltvL5z2PQthH6/tlk2H+2ct7Z fxSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8ADO7WArAbqyOHq+ilcpHXkkILz3WpU5uki0MmTLA3s=; b=twRjw1C6tuhLslkJ7MbRDhyqegewWD5viwPT0ukjDTsd/bDQ2hsFAXISeaIhe3ud86 hDkkvPYSj8uu/PhfgXX/o6H1Cwl2FORUFlj6lmk4j9+Xdq9jL7ZFHmC9ROYcBqy8adg/ +/dBLz5ErTwkIvCFd3E0WqyhHHnyi9eyeg+j2QvTYV6SRYFyDCPNAyTNBlV6XnvxtXgg TskhyirVtHus1Ra8SxKALzYNRhG10F8oWCN3BCHt59U1DRWNSyugcQXiHg71ItfBFo9V cUk2SL7JlRcriHvrGm9o3Bj3weiiHYcTG13c9yrEMKhrES69dlPTGGBw9S3jfCm6rbzh TLLQ== X-Gm-Message-State: AFqh2kpOjqoMq85hjD8PyBG/FnTt8Tj7Nd4v9DpFJNgG0KlZfhn5kCYz 7cijoFNqTne2PvQO10++NcY= X-Google-Smtp-Source: AMrXdXsv7CIr+DRfFwIIdlSMdfBH8KAA3RXflQvZnoUxkkYc8QhAzWvVhejCk3ZRRK2Cnsx9tlQWqw== X-Received: by 2002:aa7:874c:0:b0:57f:f2cd:6180 with SMTP id g12-20020aa7874c000000b0057ff2cd6180mr29201768pfo.0.1674580412177; Tue, 24 Jan 2023 09:13:32 -0800 (PST) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id i4-20020aa787c4000000b0058ddd699b8asm1831582pfo.130.2023.01.24.09.13.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 09:13:31 -0800 (PST) Date: Tue, 24 Jan 2023 09:13:29 -0800 From: Nathan Bossart To: "houzj.fnst@fujitsu.com" Cc: Tom Lane , Amit Kapila , Melih Mutlu , Thomas Munro , "Hayato Kuroda (Fujitsu)" , "pgsql-hackers@postgresql.org" Subject: Re: wake up logical workers after ALTER SUBSCRIPTION Message-ID: <20230124171329.GA677220@nathanxps13> References: <20230105171933.GB299579@nathanxps13> <20230106054017.GA786807@nathanxps13> <3355444.1673044286@sss.pgh.pa.us> <20230107004525.GB789289@nathanxps13> <20230110174345.GA1292607@nathanxps13> <1353772.1674414774@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jan 24, 2023 at 02:55:07AM +0000, houzj.fnst@fujitsu.com wrote: > I noticed one minor thing in this commit. > > - > LogicalRepCtx->last_start_dsh = DSM_HANDLE_INVALID; > - > > The code takes the last_start_dsh as dsm_handle, but it seems it is a dsa_pointer. > " typedef dsa_pointer dshash_table_handle;" This won’t cause any problem, but I feel > It would be easier to understand if we take it as dsa_pointer and use InvalidDsaPointer here, > like what he attached patch does. What do you think ? IMO ideally there should be a DSA_HANDLE_INVALID and DSHASH_HANDLE_INVALID for use with dsa_handle and dshash_table_handle, respectively. But your patch does seem like an improvement. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com