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 1nZN03-00082a-1G for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Mar 2022 01:19:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nZN01-0002Fv-Tk for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Mar 2022 01:19:49 +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 1nZN01-0002Fm-Io for pgsql-hackers@lists.postgresql.org; Wed, 30 Mar 2022 01:19:49 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nZMzz-0004Et-Gm for pgsql-hackers@postgresql.org; Wed, 30 Mar 2022 01:19:49 +0000 Received: by mail-pf1-x430.google.com with SMTP id z16so17432403pfh.3 for ; Tue, 29 Mar 2022 18:19:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=a9a/HoQxZpxLfm0kZ7hUxSRMa+hYqzb77pFJdsqmbgQ=; b=SvlRSbmr7cOMtjHZBm7wMttJwBx5mn+WzRj5v5X7yDyMuHA3G2U/YnQngXhXa+Q+xd MqXsR4ztjWMKH3DywosLieot3luxmJWfbQaRyfSTFae/tkAVOp7bFdIsZZWShJUBzQGN mKFtbholLw0uxi3INbdMtNYW5dUlaLTyZ3jJBVy6oJ4KTejCgyAtGtFJumg5fLKG6+7l 1UCUC2VfVZxGBXxNzAuwlZmiXDlCTfxcLxgIrYry/v8IEcibDDAAJrIfMOorCtZYdLkg +IINaJHSopuV7fENOwS/aGJYzWrBZzLAL0s8ankfa70U+8yQwguFZCrqTiI024MrZ5XM zD9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=a9a/HoQxZpxLfm0kZ7hUxSRMa+hYqzb77pFJdsqmbgQ=; b=bhUybA8xKm2zQ5DwqKiNJJqlDACF9tfcEMOhbGEg2vgbBduhakSqKdJPEZkn0rOYMB YU2Y7OBoxbhKgRb7yilgwGlcnal+Ec8xOqdPqdoQg0o7i656iTWjZKfb/8syV8XLVKIg 8Bzips/da60Rrw0wBiSAbF835kEUIu38tUYuygJo08Q+XS5m7J0gIMHNDbjNzqcteDiX AChGWyk0Nr1Z0M4OvexZujrk1+g5uHTJCmDk43JbozzxxYFUYnpe4i7gTZOvB9dU6F6o pLDlIB9C4w5KhC0J2n0GWOITRa6CHwsh9vEnuNhsA/l50XC5P9DSQftKBEwlGDJXF4bm qioQ== X-Gm-Message-State: AOAM532QSM3DapYArpW+qs3A9/U2q7XVNM3O5abuDK6iFMgQVtCO99OE UFsz83EIRryO509TSnS6pJk= X-Google-Smtp-Source: ABdhPJwtqSJ7LA0r3t6v66ob7JLC9XEeXqyttw+6+YuX9aNN63zvQNkFdQqii/0miIe4nC1zQ/g9aw== X-Received: by 2002:a63:680a:0:b0:383:dd15:fe68 with SMTP id d10-20020a63680a000000b00383dd15fe68mr4106982pgc.467.1648603185384; Tue, 29 Mar 2022 18:19:45 -0700 (PDT) Received: from jrouhaud (2001-b011-1005-b35e-e97a-500e-8eac-60c0.dynamic-ip6.hinet.net. [2001:b011:1005:b35e:e97a:500e:8eac:60c0]) by smtp.gmail.com with ESMTPSA id j18-20020a633c12000000b0038204629cc9sm17285306pga.10.2022.03.29.18.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Mar 2022 18:19:44 -0700 (PDT) Date: Wed, 30 Mar 2022 09:19:42 +0800 From: Julien Rouhaud To: Nathan Bossart Cc: pgsql-hackers@postgresql.org Subject: Re: remove reset_shared() Message-ID: <20220330011942.fpouca2laocok7ng@jrouhaud> References: <20220329221702.GA559657@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220329221702.GA559657@nathanxps13> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Tue, Mar 29, 2022 at 03:17:02PM -0700, Nathan Bossart wrote: > Hi hackers, > > Is there any reason to keep reset_shared() around anymore? It is now just > a wrapper function for CreateSharedMemoryAndSemaphores(), and AFAICT the > information in the comments is already covered by comments in the shared > memory code. I think it's arguable that the name of the function makes it > clear that it might recreate the shared memory, but if that is a concern, > perhaps we could rename the function to something like > CreateOrRecreateSharedMemoryAndSemaphores(). > > I've attached a patch that simply removes this wrapper function. This is > admittedly just nitpicking, so I don't intend to carry this patch further > if anyone is opposed. I'm +0.5 for it, it doesn't bring much and makes things a bit harder to understand, as you need to go through an extra function.