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.96) (envelope-from ) id 1wEmzM-004PCH-01 for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Apr 2026 11:40:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wEmzK-002DM1-36 for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Apr 2026 11:40:26 +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.96) (envelope-from ) id 1wEmzK-002DLt-1d for pgsql-hackers@lists.postgresql.org; Mon, 20 Apr 2026 11:40:26 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wEmzI-00000001utg-0VXu for pgsql-hackers@lists.postgresql.org; Mon, 20 Apr 2026 11:40:25 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4890098abbaso17895935e9.0 for ; Mon, 20 Apr 2026 04:40:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1776685223; x=1777290023; darn=lists.postgresql.org; h=message-id:date:mime-version:comments:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=AsJmVT04G0aCIEtg4nCHPnCC7ZTRJm0kA8xEqjrACB8=; b=aK7XZygWJ4de0kCVbH9sGZyq43HXOOsbhAEi6OgIAqQAbSJdcVRAnfx/uoDti4sZwK xADzP+FwWYoB4Zr2tExi3Dt7wEpj/GbFX8SzTR1j3sqGeklQcXiwiIlqnQMP4sL+3Z2w nb8OgodGgRp3v62b+Y+orj63SFOl+doxgbLF7UYb2sb0GsHvNgoZJKs3MpbYtMkQ8Ki7 eNmx5asnDhXaBv3J7rwrUNfO3oZNeNrpzQ8VosP09B4/jMMOWV6mv8htN5HQvsNNzNY5 nzs6ajiDKG0MLfTJVr6evtZGAk4OZPEk2f+RDXUs0LUM+DTkJzY2XQ58qb43D9FYhhVE gEYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776685223; x=1777290023; h=message-id:date:mime-version:comments:references:in-reply-to :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=AsJmVT04G0aCIEtg4nCHPnCC7ZTRJm0kA8xEqjrACB8=; b=cgNX4vdFN/QY/bTFsoYXWnMCkSZf94MKJf9n8TuKZel4L4kIe9sXLdqB+XNxFs/Z8A +iMWH8xqevRPHDqGx4eyeihNJj5cjgQyQ+yZC3vLuuuUfsS78xbEgpmVtd+Sk4oJomA5 sjlTxpH8Z99ahz/TKEbVZ3jmSZFGy8GSA5xgW3O4T9Hxz8opE8ZsTRWdb9WUA5/iG5p4 pYEhGNJ+UI7jhDNR8yeyk1mqwRbzAgA4X8zV2mAOII/XJALQAe87vU0BAYhXdX31NkSW lWwr75I4/VyDECefVkWS2f9HXpxWCe47jlMhq02rFCLP1belxNWtk0F4PcSd8shxXew7 mrBQ== X-Forwarded-Encrypted: i=1; AFNElJ+tax6B1OMJy/IRWDBxprwNKpjOnFQjwdZUWhGyCjDVzsv3qVOc+dR43FqHTDv1XveEogOZmGJPG6o62hlo@lists.postgresql.org X-Gm-Message-State: AOJu0Yz4KgnSX0rut3d2TVetpw3HOJyqWmsDMgDkpXUuT/MDbOJgx31z huP88gqdgFr1CP9jImktT5WPVi4B4nhqE6yFMMv595SCGAPXZ6V+q4aFXA4bCnG2wzg= X-Gm-Gg: AeBDiesJP4SOiQNT1hW26Kpj1Ur1Vp3VZoSa6oW9rMipFw4wCei1dpiwGt+LHr/C3Va U9lFteE9tsWfuKWy8yp9Yj9onR0vbKwzaRxTPifoEV69kaMHEM7pJkwxqTdMwqL7KUy7VOpDHl+ xCls3SpSHxbLK+2QcAWEQGFhDQbQzgAHTNJqLqaXWeN1nuAg/+0ZsH1f5/+8hvYH/cBBues4aeU E/tsFkIPHhLi1KieLDsrrgi1Tu0NjV53QMtlLSnurMqPy0qHHGqsZ1agcppz4dut2nqUWQ33/zU Kl6qob4Z554Vrp10eg7RHt46gMC7aBMs8b7mZkBgJs0jLNrgiNxtK88CqFRLh5PnuQEXP6S6xqF 5unLWolQuj/c8v0/Azmp/usmYRUg8RMZmeYzU4CTQIbRAnr5PEkUZURFF766ez2HqNBaA07MXau YHQxdRaJvpkY/LAdh9xRhk3392uYjKOOi6pxtRmF+FdQNxs8g= X-Received: by 2002:a05:600c:620c:b0:488:ae6c:42c6 with SMTP id 5b1f17b1804b1-488fb7786c2mr198631245e9.14.1776685222869; Mon, 20 Apr 2026 04:40:22 -0700 (PDT) Received: from localhost (109-81-168-142.rct.o2.cz. [109.81.168.142]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4891c320084sm119672055e9.2.2026.04.20.04.40.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2026 04:40:21 -0700 (PDT) From: Antonin Houska To: Michael Paquier cc: SATYANARAYANA NARLAPURAM , PostgreSQL Hackers , alvherre@kurilemu.de Subject: Re: [PATCH] Compressed TOAST data corruption with REPACK CONCURRENTLY In-reply-to: References: <52301.1776440752@localhost> Comments: In-reply-to Michael Paquier message dated "Sat, 18 Apr 2026 06:32:48 +0900." X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.3 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Date: Mon, 20 Apr 2026 13:40:20 +0200 Message-ID: <44015.1776685220@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=-=-= Content-Type: text/plain Michael Paquier wrote: > On Fri, Apr 17, 2026 at 10:40:39AM -0700, SATYANARAYANA NARLAPURAM wrote: > > I started with that but tried to follow the existing code pattern. This > > LGTM. > > Please add a comment as well. > > Hmm. I was reading restore_tuple(), and could it make sense to expand > a bit more the tests so as more types of varlena pointers could be > checked in this routine? I am taking about MAIN, EXTENDED and > EXTERNAL, so as we could check more patterns with in-line > [non-]compressed, and external [non-]compressed, counting for the four > different possible patterns that could lead to repacked data. See for > example strings.sql for such tests, that could be used as base > inspiration. ok, this is a patch to enhance the tests. It also simplifies gen_compressible() a bit and adjusts it so it is (hopefully) more reliable in generating compressible values. Now it can be used to reproduce the fix [1]. [1] https://www.postgresql.org/message-id/52301.1776440752%40localhost -- Antonin Houska Web: https://www.cybertec-postgresql.com --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Enhance-tests-for-TOAST-processing-by-REPACK.patch