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 1rFzJB-00D5KR-Vk for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Dec 2023 16:20:33 +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 1rFzJA-00EXWS-JP for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Dec 2023 16:20:32 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rFzHN-00ETjd-JT for pgsql-hackers@lists.postgresql.org; Wed, 20 Dec 2023 16:18:41 +0000 Received: from mail-io1-xd35.google.com ([2607:f8b0:4864:20::d35]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rFzHL-00BM8I-4N for pgsql-hackers@postgresql.org; Wed, 20 Dec 2023 16:18:40 +0000 Received: by mail-io1-xd35.google.com with SMTP id ca18e2360f4ac-7b71b10391aso292791839f.3 for ; Wed, 20 Dec 2023 08:18:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703089118; x=1703693918; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=BihyARKrt008HovAhQ/p39UQIEBhnUeTdXIdYtrZIKs=; b=YlQQaGHwimmRdHCRlrs/qVtJ43odsWsA1+vtZvzU+t/KqnnWFqvuda7TKZ+Jt8FfQn 8TJTSxl7V/b2/R87hkyCIEue3dxBGhgJl00isHFkMwAT8n9jvusDinNo1bd+HM1v6nSP Jfp/ukxhCj3hNaofERtC4xTKol0FlrOTolxfKI744cgF010elFB347ok43SX8+9k9knj QrLTAy9MyrzwrU8ZsPA7uJ5fEzs9mh3cqyxEHGX57xasgQvaXz/6Y3CJTSgfm+FfYvAu 6p1QAUeiKiwcsm9d+nNuOHZNlAp1DFndOMqfmUc0IZPCyt+WoJ0AwwusfS6qRq8DWH/b uEgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703089118; x=1703693918; h=in-reply-to: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=BihyARKrt008HovAhQ/p39UQIEBhnUeTdXIdYtrZIKs=; b=vvDMBbBvBueA3GP9O7D7OSqLehvC9F0HO24633w0+BauyCD1S0N/4NRviK9yqv97yq ASx/4FqD8mQ3ezkkjJk1J+9MNaz/C0pblNU3rF8hnwh7HalkffuozUhwkPYli5sPC1rn sI+nZwdYag2Dkjgmou8Tqa1+0/W6Xb8b1RXySuK3gAzaDrUTk76Eii6iMythhhC/+5um gKYS+G5ivlIlmTx5lh1EuZm9w5oiRMp9B8eBg99Zvm+A9RgwMDG9fIaBgWEo1WbGaNVK RAx+Qm1Oo83mtLWljisiUxAd3m3RYINh+F5K6YZ5Mcetw8I+N2yNi7wbSGegoUe6wdVR MEAA== X-Gm-Message-State: AOJu0Yxg8kBNiFt7+sfOmWZ+07tXAeRFRi+JU4C8cD3Yhgy9HUTV2wPz 8zHagGozaCPLlvgZ8ccE2w8= X-Google-Smtp-Source: AGHT+IFc3PBdirmRRKgLgOZtahXYNeueljBYAQHm7NuKiJYtWpkeqR+HXHjgGGyBEaxczRDimaMmcA== X-Received: by 2002:a5d:8ad2:0:b0:7b7:aab7:1406 with SMTP id e18-20020a5d8ad2000000b007b7aab71406mr8229086iot.40.1703089118329; Wed, 20 Dec 2023 08:18:38 -0800 (PST) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id a6-20020a056638164600b0046b53c82c40sm1592882jat.27.2023.12.20.08.18.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 08:18:37 -0800 (PST) Date: Wed, 20 Dec 2023 10:18:36 -0600 From: Nathan Bossart To: Zhang Mingli Cc: pgsql-hackers@postgresql.org Subject: Re: introduce dynamic shared memory registry Message-ID: <20231220161836.GC833819@nathanxps13> References: <20231205034647.GA2705267@nathanxps13> <99177ac8-f3cb-40eb-a8c1-b1aede77b803@Spark> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <99177ac8-f3cb-40eb-a8c1-b1aede77b803@Spark> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Dec 21, 2023 at 12:03:18AM +0800, Zhang Mingli wrote: > I see most xxxShmemInit functions have the logic to handle IsUnderPostmaster env. > Do we need to consider it in DSMRegistryShmemInit() too? For example, add some assertions. > Others LGTM. Good point. I _think_ the registry is safe to set up and use in single-user mode but not in a regular postmaster process. It'd probably be wise to add some assertions along those lines, but even if we didn't, I think the DSM code has existing assertions that will catch it. In any case, I'd like to avoid requiring folks to add special single-user-mode-only logic if we can avoid it. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com