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 1rgseJ-008RwI-EJ for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Mar 2024 20:41:31 +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 1rgseH-002H8F-5T for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Mar 2024 20:41:29 +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 1rgseG-002H86-RR for pgsql-hackers@lists.postgresql.org; Sun, 03 Mar 2024 20:41:29 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rgse8-002gjQ-TQ for pgsql-hackers@lists.postgresql.org; Sun, 03 Mar 2024 20:41:27 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-33d0a7f2424so2063078f8f.0 for ; Sun, 03 Mar 2024 12:41:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1709498480; x=1710103280; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=infTjq5tmRTfO6vxBQEJC4I+FpqaFHJChDqBDss+RSc=; b=NZQY2HkaEV35plr1rDSbW8XgnIldqdSD3SlpfagzZXx0+z0o68Gig3uwTHjObXE+N5 XI8GuLMv3IA83wwzU5iLlIxQFcFe9SA4vpXV4uaAXU96KtxQFsVokgyeb8IH3Msv1FNK t5k4fXQvXvlE9HcvAB0zqBxlvOlo22wP1YOog+KM02HO0/DXIKBQ/AOz9F7m1nLbEbID ayzQjDeu5MiV1DI0735jxImzOVhwOsQ88b8nHS4JWQyymEqk2aXufjaEPE75VINV5iQf VRbt9tCjYDw1bwYmpt3Lw7YkuWK5MugXewuyGqZYNKSSTPXa2QMiwhligfoC0gdYuQ53 jvWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709498480; x=1710103280; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=infTjq5tmRTfO6vxBQEJC4I+FpqaFHJChDqBDss+RSc=; b=eAFhpZwx6ws8FIKh2/+0f2Y0G1I39u0ZlEe772XmkQ55BQEDOgmmFFZBgNeMBag8UF fJrXnftRV5eu/cIWlHMMJvnQmeGb9bWUbR5znR6nK/BdmLdkVg0dEqQcmB0FNq9F8mmk T36NCqAYxwbsjYLV44Mkgy1IB70cTQPV8QxLJUyj8JA388Zm5LCtxG7I3d8++EGrUduD BASyidPVw3rq53MmvISrfE98otktINPdN6d6FN2u9+w4RO7VhYgD/83h37teM65ocLco MxL/RKaW0b8jvgTB/nF+nDrl3l45e9Cx4CyKufmg7hcvDUcmWpZ8fEHL7A/Avu2uy2Tw 7fnw== X-Forwarded-Encrypted: i=1; AJvYcCXdatt60tTKRz7NsIVU1BJ9YEMIDLnf5aSHLtzB8snUIPGtM/jdGSS0e/iVXup4277xPbPx5yi0mpSAfn+twK7dYGHFBMVYxq2tVMH97rARRHhn X-Gm-Message-State: AOJu0YwmL/vrA6CT98jIWA/gHc9emSJa1K5LcJq2LTiUAIAycFqwF0/T 79o14xokrqyaFKcjTX7ZIokVP58A0LVwGsGNdVbbwSAGGdt0wZLrOtm9ZrZ5sA== X-Google-Smtp-Source: AGHT+IEgU5Y/LnyhNUOLuWn+vbGsm2DJyXyzo7mjCaxvsVCtsLGaqip3IK9AcC66terTf0TKtvcaag== X-Received: by 2002:adf:f407:0:b0:33b:784c:276e with SMTP id g7-20020adff407000000b0033b784c276emr5888245wro.25.1709498480440; Sun, 03 Mar 2024 12:41:20 -0800 (PST) Received: from [10.137.0.18] (ip-86-49-225-243.bb.vodafone.cz. [86.49.225.243]) by smtp.gmail.com with ESMTPSA id i9-20020a5d6309000000b0033e122a9a91sm9702149wru.105.2024.03.03.12.41.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Mar 2024 12:41:20 -0800 (PST) Message-ID: Date: Sun, 3 Mar 2024 21:41:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Shared detoast Datum proposal Content-Language: en-US To: Andy Fan Cc: Nikita Malakhov , Michael Zhilin , Peter Smith , vignesh C , Matthias van de Meent , pgsql-hackers@lists.postgresql.org References: <87il4jrk1l.fsf@163.com> <87sf3andy2.fsf@163.com> <87wmskm9qu.fsf@163.com> <87v87kvboq.fsf@163.com> <71321d83-391b-473b-aaf6-618c7f682b96@postgrespro.ru> <87r0i7vos3.fsf@163.com> <874je3hcwn.fsf@163.com> <8734tmg88e.fsf@163.com> <7f4c8673-4c5d-4dbf-b8e5-0ec11cd2fba0@enterprisedb.com> <87h6i2djf9.fsf@163.com> <87jzms0xza.fsf@163.com> <87frxf1gld.fsf@163.com> <871q8z19ux.fsf@163.com> <87msrgdq93.fsf@163.com> <87frx7et1j.fsf@163.com> From: Tomas Vondra In-Reply-To: <87frx7et1j.fsf@163.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 3/3/24 07:10, Andy Fan wrote: > > Hi, > > Here is a updated version, the main changes are: > > 1. an shared_detoast_datum.org file which shows the latest desgin and > pending items during discussion. > 2. I removed the slot->pre_detoast_attrs totally. > 3. handle some pg_detoast_datum_slice use case. > 4. Some implementation improvement. > I only very briefly skimmed the patch, and I guess most of my earlier comments still apply. But I'm a bit surprised the patch needs to pass a MemoryContext to so many places as a function argument - that seems to go against how we work with memory contexts. Doubly so because it seems to only ever pass CurrentMemoryContext anyway. So what's that about? regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company