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 1pKNo3-0004hf-5O for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Jan 2023 18:14:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pKNo1-0003Ua-Hx for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Jan 2023 18:14:01 +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 1pKNo1-0003UR-8S for pgsql-hackers@lists.postgresql.org; Tue, 24 Jan 2023 18:14:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pKNnz-0001ET-3v for pgsql-hackers@postgresql.org; Tue, 24 Jan 2023 18:14:00 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 30OIDtG62268134; Tue, 24 Jan 2023 13:13:55 -0500 From: Tom Lane To: Nathan Bossart cc: "houzj.fnst@fujitsu.com" , Amit Kapila , Melih Mutlu , Thomas Munro , "Hayato Kuroda (Fujitsu)" , "pgsql-hackers@postgresql.org" Subject: Re: wake up logical workers after ALTER SUBSCRIPTION In-reply-to: <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> <20230124171329.GA677220@nathanxps13> Comments: In-reply-to Nathan Bossart message dated "Tue, 24 Jan 2023 09:13:29 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2268132.1674584035.1@sss.pgh.pa.us> Date: Tue, 24 Jan 2023 13:13:55 -0500 Message-ID: <2268133.1674584035@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > 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. Yeah, particularly given that dsa.h says /* * The handle for a dsa_area is currently implemented as the dsm_handle * for the first DSM segment backing this dynamic storage area, but client * code shouldn't assume that is true. */ typedef dsm_handle dsa_handle; but then provides no way for client code to not be aware that a dsa_handle is a dsm_handle, if it needs to deal with "invalid" values. Either that comment needs to be rewritten or we need to invent some more macros. I agree that the patch as given is an improvement on what was committed, but I wonder whether we shouldn't work a little harder on cleaning this up more widely. regards, tom lane