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 1rFcfE-00Azg4-TS for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Dec 2023 16:09:48 +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 1rFcfD-002dXS-Ck for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Dec 2023 16:09:47 +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 1rFcfD-002dXK-2m for pgsql-hackers@lists.postgresql.org; Tue, 19 Dec 2023 16:09:47 +0000 Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rFcfA-00Coux-Fi for pgsql-hackers@postgresql.org; Tue, 19 Dec 2023 16:09:46 +0000 Received: by mail-io1-xd2e.google.com with SMTP id ca18e2360f4ac-7b7fdde8b98so3019939f.1 for ; Tue, 19 Dec 2023 08:09:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703002182; x=1703606982; 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=kpvfO8VWJOJJsAr5NYwSs+b1oBqPwmh7pju/jcYJIiI=; b=RaSYG2pLGsQsLkBnH/r9fRItQTge6CExedqsbsdhoc7a0kvq4ka56uWyGYFIM0usTB eqs5b5ppOjgY5gHdVX3EY7z3Jzs2VHAkXMv1rlqiHqX7vKwXQ2ZqrF9jR3VxmXcYZ3lC mXuRmqZreG7HsVmYvILSmXOjHzcekwWw4lAySlwxxb9JHMBlbn1afaHDfvMxahtxp8Hd y9z5UHM9zQhfSq5H9mabpsjMl1LMdtix+AeO+mOSqVMb6wQ1MVDxNeY4zrXEQM99i5rw GKvUPXkh2Eu/nGwE9Sms9u1C/7woq7TWrCMKhDi7/ErosFf8yb2Dcz9D5AfoYOw+n5Y/ SJ9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703002182; x=1703606982; 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=kpvfO8VWJOJJsAr5NYwSs+b1oBqPwmh7pju/jcYJIiI=; b=ua9ViSiYFU0qHmk/lnkD/a4Ay7i1LX9idEL4auFsYbfNKfNpzWyjfKzl/TLD6wH/MZ UDWYP6JGtM/9gUh6up1fdcwqSNv2IIr5Z7zOLpLqG8TNiJOlEkn4wad6GEpS2bGnBThU 1LCrMfrfYW6Wm6NzC07k9+ti2ku4u2r6H1mnx4g4U7x8Mbtj8Ls+DEv81d6H/g9epuYw BzSyAOTBJWytgzhWy+WRw4XpOEAS+bK8K3V+FZz6FTmIRffZSRTBAhD7aEx4X5sFXKyC xgfN5panL+ndYmiYe1Bya5n6kk8xqdDyDI7X3Ky3xJ0O5m78AyNWgCwjrx6lm4zENN0Z IJvw== X-Gm-Message-State: AOJu0YwJaaHwd9Dm9QOj3Wsnqlz04x/u9M1Vd08DM2iLs7eMptsCoMuM ivykcQfGKPQh0hACvBeZ0ysiP4wAkvs= X-Google-Smtp-Source: AGHT+IFgyiyx5t9ef8bWGdMnP5Ryr7v2dGOc+3PqhgKFqBt+Wxq25XZS8hqjkXPIQUz7y8mswZKhGw== X-Received: by 2002:a05:6602:3a11:b0:7b6:fb5d:fe4c with SMTP id by17-20020a0566023a1100b007b6fb5dfe4cmr20347448iob.29.1703002182373; Tue, 19 Dec 2023 08:09:42 -0800 (PST) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id g22-20020a05663811d600b004695b2d024fsm968487jas.119.2023.12.19.08.09.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 08:09:41 -0800 (PST) Date: Tue, 19 Dec 2023 10:09:39 -0600 From: Nathan Bossart To: Nikita Malakhov Cc: Andrei Lepikhov , pgsql-hackers@postgresql.org Subject: Re: introduce dynamic shared memory registry Message-ID: <20231219160939.GC831499@nathanxps13> References: <20231205034647.GA2705267@nathanxps13> <3dcea2e9-c46d-4e4f-8371-9526d1aebc83@postgrespro.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Dec 18, 2023 at 12:05:28PM +0300, Nikita Malakhov wrote: > Just a suggestion - maybe it is worth adding a function for detaching the > segment, > for cases when we unload and/or re-load the extension? Hm. We don't presently have a good way to unload a library, but you can certainly DROP EXTENSION, in which case you might expect the segment to go away or at least be reset. But even today, once a preloaded library is loaded, it stays loaded and its shared memory remains regardless of whether you CREATE/DROP extension. Can you think of problems with keeping the segment attached? -- Nathan Bossart Amazon Web Services: https://aws.amazon.com