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 1sEsJg-004DLn-3X for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Jun 2024 15:12:45 +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 1sEsJf-009JOi-TP for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Jun 2024 15:12:43 +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 1sEsJf-009JN7-Et for pgsql-hackers@lists.postgresql.org; Wed, 05 Jun 2024 15:12:43 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sEsJX-003axx-U7 for pgsql-hackers@postgresql.org; Wed, 05 Jun 2024 15:12:41 +0000 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1f658800344so31967395ad.0 for ; Wed, 05 Jun 2024 08:12:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1717600355; x=1718205155; darn=postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VvKuI/eSn/6hou+conLSLWPLUm/QgjJfzUMmZpJMzgs=; b=XhoDOAnY/d/hNXCC/7fbfMond7PfzwEBmBRnQjiuPE7xXEYu/JXiOmWeRUFuY9PQJD gKpeE2giCdn5Cjfoej+sBdObInL3f4tIJqhCy8LxZnZb7IJMbn+2oRhs0NyRHmSI7udq cyms7W+5v8cySavIkjdTLzYiLfe8HPz4bQ/4rz8XhXKnJRZxuFoeX+g/s6Jn0gsIL2E8 pkbqjDu9Bulwbr2JytkYXmX9+sBqBnlyAAhuHzO02p+lMa6qsxWtMH/q14Lqfdlv0ZN6 wrYaEssY1fvvXCHhCt+pskjq8s5po1EWDDQ2TwS5X48QCvCnwi5tqsuJphfLt/jBUQ2y liAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717600355; x=1718205155; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VvKuI/eSn/6hou+conLSLWPLUm/QgjJfzUMmZpJMzgs=; b=VtZTQPIJiMyneUfUzT7lwhaRRpZYaz5e+cY2YGpMb7UymsaeJQrTf7itVoDv0F8EFb XhDsqlF/eMHTUwkW9rkaG7UZlL60w+WxmLB9Ldqc0m6bh7SX0rb5/8TVLSnMARljcW5I tjdk72Vz8o/pCiU8etPiE28ztImH58iNhjV8Ed6guBoq+zhtiRMWIfpv6AUrR8Kdj5pp ZMmf8+G8lHNpnMvmLZvRQUscUBGdH/x+dkFBnfD/2wTnSKjnee2JBI3pYtOKingjJgIe OvUWkNuMjhVSVoE3g2hEmANbORB4xoQBw5AH0ZwyxjkOc4Ac1K2B3Uz4YFAPOkUgDXHj Rv8w== X-Gm-Message-State: AOJu0YylGu0yR2mGWwW4iW07Ce9B/xxpInUKoCrzsiJcaKVR6HGrSkc0 9QgxY1HmjGsLxyk9dt+XTxE6TrcONeZ+mHu/9W1r1QOL8liWi5KJs8rNW8VadQ== X-Google-Smtp-Source: AGHT+IHEWJEC86pDYlyW6PR7vdPi2vWG4irOSZgSz0wq9xlbni8p1fdn+tY5y47VPyNKhTyZZb5QLQ== X-Received: by 2002:a17:903:182:b0:1f6:628a:1971 with SMTP id d9443c01a7336-1f6a5a80de1mr35176905ad.57.1717600354620; Wed, 05 Jun 2024 08:12:34 -0700 (PDT) Received: from smtpclient.apple ([2600:100f:b074:b1b:512c:e450:aecf:f171]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f632403327sm103515525ad.244.2024.06.05.08.12.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jun 2024 08:12:34 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.1\)) Subject: Re: XLog size reductions: Reduced XLog record header size for PG17 From: Mark Dilger In-Reply-To: Date: Wed, 5 Jun 2024 08:12:47 -0700 Cc: PostgreSQL Hackers , Heikki Linnakangas , Robert Haas , Dilip Kumar , Andres Freund Content-Transfer-Encoding: quoted-printable Message-Id: <3496C21F-8836-4341-B8A7-7BB3F611735B@enterprisedb.com> References: To: Matthias van de Meent X-Mailer: Apple Mail (2.3731.700.6.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Jun 20, 2023, at 1:01 PM, Matthias van de Meent = wrote: >=20 > 0001 is copied essentially verbatim from [1] and reduces overhead in > the registered block's length field where possible. It is included to > improve code commonality between varcoded integer fields. See [1] for > more details. Hi Matthias! I am interested in seeing this patch move forward. We = seem to be stuck. The disagreement on the other thread seems to be about whether we can = generalize and reuse variable integer encoding. Could you comment on = whether perhaps we just need a few versions of that? Perhaps one = version where the number of length bytes is encoded in the length itself = (such as is used for varlena and by Andres' patch) and one where the = number of length bytes is stored elsewhere? You are clearly using the = "elsewhere" form, but perhaps you could pull out the logic of that into = src/common? In struct XLogRecordBlockHeader.id = , you are reserving two bits for the = size class. (The code comments aren't clear about this, by the way.) = Perhaps if the generalized length encoding logic could take a couple = arguments to represent where and how the size class bits are to be = stored, and where the length itself is stored? I doubt you need to = sacrifice any performance gains of this patch to make that happen. = You'd just need to restructure the patch. =E2=80=94 Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company