Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q1Uxb-0004Ye-VL for pgsql-hackers@arkaria.postgresql.org; Tue, 23 May 2023 16:34:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q1Uxa-0006iS-St for pgsql-hackers@arkaria.postgresql.org; Tue, 23 May 2023 16:34:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q1Uxa-0006eq-Hk for pgsql-hackers@lists.postgresql.org; Tue, 23 May 2023 16:34:06 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q1UxY-001UCJ-1R for pgsql-hackers@lists.postgresql.org; Tue, 23 May 2023 16:34:05 +0000 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4f3b39cea1eso76484e87.3 for ; Tue, 23 May 2023 09:34:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684859642; x=1687451642; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xqzLZ2K+aCUYuBlwk7pkJVIaveMyzRoJlWU26cixV5A=; b=jwelKk/ZT6EdGtsOhQcVBSBCydWho3fH0/yZSA1eAQCT4i6visbayLSqkVOREbaHOw pfrjGQvAR/+hFyUUSAWVqF0JGTsy6cZCnNyJ+5nSeiWs3rZyU38F8bfPAJdUO2kHSBjL XrTSNccrTrTxJLmM/O255sABW+ztKB7LKN+j33UhvJJTJFHMT5xHoewdKfyZykfBf2fk 2jymF/5mn9DVQJnnAGmnotT5zgyC91ToMCCSWYYYQOV2GrHhCYCo6CtSqS0LDixq37XU wnj3wB01eZ6JdpR6BRwjHOM86EcU/CkYTQALPzpkcqUYXtsW9M1Pvhn6M5478rPrOjwN TcWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684859642; x=1687451642; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xqzLZ2K+aCUYuBlwk7pkJVIaveMyzRoJlWU26cixV5A=; b=FI4ZVC0or/C2HPtVP2e6TBL8M6d+ET+reZIsjKyAeE+tr3gVx8TiPIvhIpAEciGn8K SdzrV6MaS/+zf8526Ma6DOohy7JjzEGxOt01tuJ845tlGFp06hXxNQ2Yqa3IQqRmuLkK g+27T4/CSKXMExdcIyal7cCLANAEbl3yjP5o+L5yYz2e/SDZQTUW9xbpLs8zxviyxlCz Mb0U+WVscQtqeSQoe/+wIyhSCKJIgdKx8UKl+543PLTmZENmcyZbaVXd+V+m6gf5dlwF 2D4+3S+1S4vl20K5bvMYdCOsJuJef7D48oO4JVynicqrinzMIw8VexlyOmFqGIJEhm7k DouQ== X-Gm-Message-State: AC+VfDyfhDfxKFt3yh0hmm7MWVxDpZHoPC5obp38T10Ne0pUl419GUMx dHxIL2t9YKOGPZRUUuqVuCNr9/lVod9q2gCGF6M= X-Google-Smtp-Source: ACHHUZ7effDH3xPt5MdS+SYebgwDwTLLXiJkCG+AV4nDubw7mRNdXWbKSIzrLDQrLOreosKI6Ir8wzwev81UpvjFqRw= X-Received: by 2002:ac2:4556:0:b0:4f1:5015:43c4 with SMTP id j22-20020ac24556000000b004f1501543c4mr4618457lfm.38.1684859641394; Tue, 23 May 2023 09:34:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Robert Haas Date: Tue, 23 May 2023 12:33:50 -0400 Message-ID: Subject: Re: RFI: Extending the TOAST Pointer To: Matthias van de Meent Cc: Aleksander Alekseev , PostgreSQL Hackers , Nikita Malakhov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, May 18, 2023 at 8:06=E2=80=AFAM Matthias van de Meent wrote: > This enum still has many options to go before it exceeds the maximum > of the uint8 va_tag field. Therefore, I don't think we have no disk > representations left, nor do I think we'll need to add another option > to the ToastCompressionId enum. > As an example, we can add another VARTAG option for dictionary-enabled > external toast; like what the pluggable toast patch worked on. I think > we can salvage some ideas from that patch, even if the main idea got > stuck. Adding another VARTAG option is somewhat different from adding another ToastCompressionId. I think that right now we have embedded in various places the idea that VARTAG_EXTERNAL is the only thing that shows up on disk, and we'd need to track down all such places and adjust them if we add other VARTAG types in the future. Depending on how it is to be used, adding a new ToastCompressionId might be less work. However, I don't think we can use the possibility of adding a new VARTAG value as a reason why it's OK to use up the last possible ToastCompressionId value for something non-extensible. For projects like this, the details matter a lot. If the goal is to add a new compression type that behaves like the existing compression types, more or less, then I think we should allocate the last ToastCompressionId bit to mean "some other compression ID" and add a 1-byte header that says which one is in use. But if the new feature being added is enough different from the other compression methods, then it might be better to do it in some other way e.g. a new VARTAG. --=20 Robert Haas EDB: http://www.enterprisedb.com