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 1ldy9K-0004iY-6W for pgsql-hackers@arkaria.postgresql.org; Tue, 04 May 2021 16:43:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ldy9J-0000Hc-2D for pgsql-hackers@arkaria.postgresql.org; Tue, 04 May 2021 16:43:53 +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 1ldy9I-0008Sb-LV for pgsql-hackers@lists.postgresql.org; Tue, 04 May 2021 16:43:52 +0000 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ldy9G-0007Yo-3c for pgsql-hackers@postgresql.org; Tue, 04 May 2021 16:43:51 +0000 Received: by mail-oi1-x22a.google.com with SMTP id u16so9357890oiu.7 for ; Tue, 04 May 2021 09:43:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=jKXUcXFraxea+e7W+lGyDQyERAWgMgKFoFq6KNav+yE=; b=nFua9ef+ZSx52VAhFEhGMsSQ8PVAXtsBrL6OIwffaGd6yNtnAjbEGF3eZFdakmqZ2y PoIcYcX+NOcytuQ5F19zLAJcdqxHM2e///xoiu0G1q+5wnq45udiD4nKRmM/3a1/49/X 8VCRxdH1JMWPrasoqrvav/vkCjGffVwm+cdH5mplDKy1TSJkpMjMyZvEkQXdr42e64mr HO6RDIuXq9Mz0Z1EWqBbahP7jrNimh+ATBL5G+Wisbai1+Lr2ReKYOLb28J69mC456Fu vVLDR8UOkQzp915uApXv6xG5ZzcXJ8qJXFN2s6IEY5p7guT6uxLpKg5dPwZxCw6258gD klIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=jKXUcXFraxea+e7W+lGyDQyERAWgMgKFoFq6KNav+yE=; b=HaqbOXTIpC7i0Fm9aplRRLDnq58o+03A/knCajdxjciOaTO/e5l/tpCcLUvYsX0wjn vvKG7N1cEsszrstTHJE+hpEJ58AQaIlZmMq7ImXe28aHeb3BRcotk9TSeVPj50p4COLz f+058papuQXuvej9t+dIR7enirMOyPTUddd5Zgecx5Gn94H77B/LxGWWC7sSDwKDmxP5 wg1zBZndNI4RD4VQNxpZ0SUIHRRbf969kTVgnQHmHWtQxxZ3qfZMEkKD5JCngrow55lG gRu87FNcA724Djgu9ZbbdBJ2MBHd6cGelJyxjEFGv3x/6miLIyYkaOH2dKg0zAM8siD6 9Blw== X-Gm-Message-State: AOAM532XzSwGIr1fvljlqYidjaBsKItPyi6la/ZCgb/KvIdrag7yHK4q rsKgfBtrCHlTye9Cw/365pxX+w== X-Google-Smtp-Source: ABdhPJwkPOpu5wq8iiSQ2NAdKarzzRTQ8UpJ3vefC1Z1vW7qtBkDf+TPx5AIEhRYP2u8MTzUYN5UUw== X-Received: by 2002:aca:b5c4:: with SMTP id e187mr18462779oif.149.1620146629437; Tue, 04 May 2021 09:43:49 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id 34sm861340otf.38.2021.05.04.09.43.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 May 2021 09:43:48 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id BFC95800B42; Tue, 4 May 2021 11:43:47 -0500 (CDT) Date: Tue, 4 May 2021 11:43:47 -0500 From: Justin Pryzby To: Mark Dilger Cc: pgsql-hackers@postgresql.org Subject: Re: Extending amcheck to check toast size and compression Message-ID: <20210504164347.GE27406@telsasoft.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk + /* Oversized toasted attributes should never be stored */ + if (toast_pointer.va_rawsize > VARLENA_SIZE_LIMIT) + report_corruption(ctx, + psprintf("toast value %u rawsize %u exceeds limit %u", + toast_pointer.va_valueid, + toast_pointer.va_rawsize, + VARLENA_SIZE_LIMIT)); + I think the comment sounds wrong since toast is precisely for storage of "oversized" attributes. https://www.postgresql.org/docs/current/storage-toast.html | This section provides an overview of TOAST (The Oversized-Attribute Storage Technique). -- Justin