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 1wF6Yd-004kWG-08 for pgsql-performance@arkaria.postgresql.org; Tue, 21 Apr 2026 08:34:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wF6Yc-007XEk-14 for pgsql-performance@arkaria.postgresql.org; Tue, 21 Apr 2026 08:34:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wF6Yc-007XEb-08 for pgsql-performance@lists.postgresql.org; Tue, 21 Apr 2026 08:34:10 +0000 Received: from mail-yw1-x112c.google.com ([2607:f8b0:4864:20::112c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wF6Ya-00000002GkA-09Ml for pgsql-performance@lists.postgresql.org; Tue, 21 Apr 2026 08:34:09 +0000 Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-7986e538decso37502927b3.1 for ; Tue, 21 Apr 2026 01:34:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776760446; cv=none; d=google.com; s=arc-20240605; b=Opf19+BWY0NPV6iK0ipwqBSFmUrB64r89loS0D1NQS8C+en4CCxj/PAkdcJSBaWlJt 3qEMe8PmMeP9I//dsaOYVk8suk4sb8Xj6dE97YtH9lOJr/MguLzJrQLXl7p0YIhZMAP+ 83WvkKBQ1oPLkrSk4iCYC11igBENhtKL8AMnVAcMZOZ31cnTa2F45bKie6UTNerNpBmc BX1o6sF19F8jNB0+N65TdrQyFhyR410K16oifG5yd+q1/O6Hb0eXpGQGB+YfhnCRI5Ns IbHmHDmFCSiJaZIe+c8WbyksoqCnCgOAdExzq4zDn6KTi3CSvFg5f3kOprs8MRV2BwAy Jrlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8wwh6vrg+ZlR4/WJjymrEsi6zV8vB6iDNMc4QA3xKrw=; fh=iZPgVOw7sqSewo005q6NZ5iH8BSTr55NshKtTKqjgqM=; b=aLGc3jewjZg4cznsOp+MIzSftb7JhoNOnUbc5YVfHSCTG6wCbMDkdt9AN9ViaO4Ygw dSwBmTr6iwJP0zxIG1F+NcNTzynvGUrUwV2Hg1+e/gaqXzIgKQz6g+lLHwqKV84YOnZ7 SDW71PTFBPlWZVP9it+jC+pkYO/4o62RmfHssCVFVi0ujkjfGTz4NWfBavxBwRkhO+FW 1+XomSKGGqJysPqlMcDS2+IZNXpogTtw6TZP1LTY8tm2JLKwPCpfLiyjVKnhDAYf9/Xl cf2DgTSlcFQIIvjl0DXHuHariZcTlX6quXE1oGvuMWBC+qIt2ZFPEx4+dFJhzqQErgHg fFRQ==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776760446; x=1777365246; darn=lists.postgresql.org; 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=8wwh6vrg+ZlR4/WJjymrEsi6zV8vB6iDNMc4QA3xKrw=; b=K5RdjNhDsb73mC1QoV4rfJrZmg9PGJOjId1XwR38wzVgdjJXLKWmWZrQ/HkxsYOsbc cD5ecY+GrQzwBA5V3DxWazlRno+AoSa/tG33/mVE9sc89DPAQ4kHMBgT+bZwFDlyoBvp UvMpru93K6JZzEmMrnPDzLFDSGEfM2U48eKvTxuo0F1zsH6tdGNTxcBl9JhxvmHbvzZt 8um4xv5UgVTP5RoE4we27QhMMQoeuLrLNZG5jswp6VkeHa9/P+3Fi+aIZLPlyU47JRSF 5QE34pn6ELIegs9ReystXIrh5Cm4oQI6MUzcmDwg2JZ4dyrRFfCjunyAQpuFCQQu7sMM 67ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776760446; x=1777365246; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=8wwh6vrg+ZlR4/WJjymrEsi6zV8vB6iDNMc4QA3xKrw=; b=OU2v9RmQmaKQ4SH6Hr8yMtGf8pDy7QdSHqUGc+ycjqtiF4tDYmAk04KIN3yppRwRfj j8vO8FXPNfRbq8ESzEjiRwta+yHESzTDRRZiqpxzfxo7nOqwbwbLvZIFNFVhegn6PpBT lQngYeamCBfoD6863lXToRg1FK8f7OD9wQd1rNw5GGdRd+onLUNRkl518pwrqBtZCmld kgrMV7wZnD9sF7jY8espblDUXwiwFQezW41e1LVBrwvOvv7FdpAno6RJjq4ROAVksCEE ug7g5f5MNu0QfPgTY26iiWvkD3qADg38NUTMew4oWiLZEc9H6ErSEk5S8aa+sT1traIW edbQ== X-Forwarded-Encrypted: i=1; AFNElJ/u8SP7U+LBTPixyZk3tZmDiXEh6k1YXUVmPUyZqS6p6cGNV/4F6bduEZXhulFFm25iSRzZQPsMvlE4dG8KaB+n0w==@lists.postgresql.org X-Gm-Message-State: AOJu0Yychur+VyK6dor8X1Ol+l6y6GbNKlFUTYXgHPydi4x+oUjDNTU7 r0sJLT824AtqnfAxK9INYjJNA3z2Dxy+j/ZQaU72mb3jozROWasEO3Tn3R3MRdPIcO+yzX2nRht yALBLNpm7afy0nhA3zvbBpAczCTdXbzI= X-Gm-Gg: AeBDieu64hD/Q3Jh10oT96y2Q9l4oKXU/4vcnqJ+OUlH6fGiHTByiu3VwTAK9JKGme/ 4Ybvuhxos3wn/0lcagBcKB/CfEIZHnbnierMrS3DeKi31thh0lNt8UPeYnICQsCfDjGrOXg5wuu FmAsG7PuSr8I/51+KhechNer8Dw+Lm4GRrZQZ5J15hlL9JfEo48OWbRyA7yeZdeBq8828doyWtj 9hyrlWEw0eYoxy5Lq70+lqfE6Uh4M8TMW5xPU8+BsvaWE7ZvlPw1VsfKqT1Bbhdk2Jg3iOnwqAr 77yvUKuQdc6vH44lxNLFTUWBgvdBMuD//YL+UgxefgnEO8nnNpOxnq4yCukGe39sR1IQ9ah/wmL 6 X-Received: by 2002:a05:690c:8d06:b0:79a:dd59:a844 with SMTP id 00721157ae682-7b9eced4487mr147148587b3.16.1776760446119; Tue, 21 Apr 2026 01:34:06 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kristjan Mustkivi Date: Tue, 21 Apr 2026 11:33:53 +0300 X-Gm-Features: AQROBzDhiSwrtJxuigBip0xZVN0hLb7k5wNathIzBlperrQC_-kU8Kma3jAgfiU Message-ID: Subject: Re: table bloat very fast and free space can not be reused To: Rick Otten Cc: James Pang , pgsql-performance@lists.postgresql.org 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 Mon, Apr 20, 2026 at 5:39=E2=80=AFPM Rick Otten wrote: > > Which design is an antipattern? Using json for volatile data sets or un= logging the table? For us, a large (i.e spilling over to TOAST) json blob in a table where this json blob (or text, does not matter) gets very frequent (hundreds and thousands of) updates per minute. > Does `pg_repack` help? I know it probably isn't practical to run it ever= y couple of days. It also can sometimes causes headaches when repacking a = table with a ton of logical replication activity, but it might be a tool to= consider if you haven't already. If you can partition the table with the= crazy amount of json changes, you don't have to repack all the partitions,= you might be able to repack just the older ones with the worst bloat. This feels like a complexity I personally would like to avoid. Far more preferable is to get rid of the json. Split the large json into a normalized table design based on the most useful/frequent patterns. Br, --=20 Kristjan Mustkivi Email: kristjan.mustkivi@gmail.com