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 1qgm3I-00HIrp-SF for pgsql-docs@arkaria.postgresql.org; Thu, 14 Sep 2023 13:06:37 +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 1qgm3H-008Nl2-0b for pgsql-docs@arkaria.postgresql.org; Thu, 14 Sep 2023 13:06:34 +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 1qgm3F-008Nke-Hk for pgsql-docs@lists.postgresql.org; Thu, 14 Sep 2023 13:06:34 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qgm38-0052aA-SZ for pgsql-docs@lists.postgresql.org; Thu, 14 Sep 2023 13:06:32 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id A94615C0185; Thu, 14 Sep 2023 09:06:24 -0400 (EDT) Received: from imap49 ([10.202.2.99]) by compute6.internal (MEProxy); Thu, 14 Sep 2023 09:06:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eulerto.com; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1694696784; x=1694783184; bh=7C 6cIZDE7RvJVk3EARkq+ta1Pc/8YxGwimTsGYiaEno=; b=b36WCNKEAhy7lF2Uhe XN2ItyG5RhI9E2CfGVWiIOM/5HZG3EU9Ok7ARwG4OWIvK4KuxanEK09J2vcKIjU0 e/RunhUC17CuxxUDIhdK6w+jUTwkmfsEEGf58miF+dqKyQKkuBT/AriHW1TOAvxF 7Ua/eA4YgFXyVX+vjc8bfw3X4LzfAvwy3EC0FxFP9LERik1rNWMiOaOCXXVsRTle SF4uAUQDLwA7HtzddMpEp3A91QhPCtjt8ICREGy1kNsW5Vq2sYfz80N5GbvpfH0T KE6OXjMP1MucmyNdv/JYSlStzfoZW5dp205FmKcgODvGreSopnWW8FIha4HZ0Hb6 raMQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1694696784; x=1694783184; bh=7C6cIZDE7RvJV k3EARkq+ta1Pc/8YxGwimTsGYiaEno=; b=ZZtRO9Nr4pOHnvpuxECT88pgLMKhN ugdRUq3c6sj2henaGAqOzHQGznhFsstFth2zhy+gUwYyCxCvpcOHJBZiZ6jHs3Su ArdZiJSUeJxUIkE1cp08WR1fLojwjfTke5nzZilBYn+vLMaD0P3jtGn25pzOwhK9 EnHzH07SIR//5lKLl8FG/fTFme5OCQeiuZtFk9sQ5+VswxLCYZT2yCPJ18jcUhUL jYOpsYMb1TbI+ADyMuFmAF5oaqJlWTZc1VwUWDnu/8UWykE0pPuOAfnV/c3jliBr hc4/HaQv/0xkfVcl8wbgF2agc97S0B/nmOH4EvpevGrJngTiI4z4S85CA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudejtddgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvvefutgesrg dtreerreertdenucfhrhhomhepfdfguhhlvghrucfvrghvvghirhgrfdcuoegvuhhlvghr segvuhhlvghrthhordgtohhmqeenucggtffrrghtthgvrhhnpefgffejvdeivdekvdeivd etudeikeduieevtdfhhfduvdetgeelteeiffekgefhvdenucffohhmrghinhepvghnthgv rhhprhhishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepvghulhgvrhesvghulhgvrhhtohdrtghomh X-ME-Proxy: Feedback-ID: i0c21471d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 0D8DC15A0091; Thu, 14 Sep 2023 09:06:24 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-745-g95dd7bea33-fm-20230905.001-g95dd7bea Mime-Version: 1.0 Message-Id: <6ba13314-2d5d-4828-ad49-0bb46775a027@app.fastmail.com> In-Reply-To: <20230913164822.41e4c0bd@seebsdell> References: <169454016225.2433963.11433530945607791340@wrigleys.postgresql.org> <20230913164822.41e4c0bd@seebsdell> Date: Thu, 14 Sep 2023 10:06:03 -0300 From: "Euler Taveira" To: Seebs Cc: pgsql-docs@lists.postgresql.org Subject: Re: index access method documentation light on details on ii_AmCache Content-Type: multipart/alternative; boundary=d4aecb6be0b841a8be6e099375c38c02 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --d4aecb6be0b841a8be6e099375c38c02 Content-Type: text/plain On Wed, Sep 13, 2023, at 6:48 PM, Seebs wrote: > On Wed, 13 Sep 2023 15:48:41 -0300 > "Euler Taveira" wrote: > > > Unless you change it, ii_Context is CurrentMemoryContext (see > > makeIndexInfo). Hence, your AM state information is freed when the > > current memory context is freed. > > A thing I am now wondering: > > Is there anything in the postgresql documentation which explains this, > or says when a given memory context will be freed? Like, is the > ii_Context there for the lifetime of the index? For the lifetime of the > query? For the lifetime of a single insert operation? AFAICS there isn't a chapter dedicated to memory contexts in the documentation. Did you check the README that I pointed out in the previous email? Most of the developer information is available in README files in the source code. Server Programming and Internals contain useful information for Postgres hackers too. -- Euler Taveira EDB https://www.enterprisedb.com/ --d4aecb6be0b841a8be6e099375c38c02 Content-Type: text/html Content-Transfer-Encoding: quoted-printable
On Wed, Sep 13,= 2023, at 6:48 PM, Seebs wrote:
On Wed, 13 Sep 2023 15:48:41 -0300
"E= uler Taveira" <euler@eulerto.com= > wrote:

> Unless you change it, = ii_Context is CurrentMemoryContext (see
> makeIndexInfo= ). Hence, your AM state information is freed when the
>= current memory context is freed.

A thing I= am now wondering:

Is there anything in the= postgresql documentation which explains this,
or says whe= n a given memory context will be freed? Like, is the
ii_Co= ntext there for the lifetime of the index? For the lifetime of the
query? For the lifetime of a single insert operation?
=

AFAICS there isn't a chapter dedicated = to memory contexts in the documentation.
Did you check the= README that I pointed out in the previous email? Most of the
<= div>developer information is available in README files in the source cod= e. Server
Programming and Internals contain useful informa= tion for Postgres hackers too.


--
Euler Taveira

--d4aecb6be0b841a8be6e099375c38c02--