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 1w6nDK-004ehs-00 for pgsql-docs@arkaria.postgresql.org; Sun, 29 Mar 2026 10:17:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w6nDG-00G6H7-2K for pgsql-docs@arkaria.postgresql.org; Sun, 29 Mar 2026 10:17:47 +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 1w6iqO-00FlCE-0y for pgsql-docs@lists.postgresql.org; Sun, 29 Mar 2026 05:37:52 +0000 Received: from mail-westus3azolkn19011071.outbound.protection.outlook.com ([52.103.23.71] helo=PH0PR06CU001.outbound.protection.outlook.com) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w6iqM-00000001bFT-30Dc for pgsql-docs@lists.postgresql.org; Sun, 29 Mar 2026 05:37:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cuOFM7fwVkMxKLKWNEAnrIroE4TDhxNSPuC/S9PwfVAMaJ9/77TrGmOkVXuWut2vGwMSz/4jtvkG0UZINiZD1+hgTe9ueIwJgTGhfqje1aFNQOl87k0EBzXl2A0Q+ra2reEDaEvOJimK2sgdTHcIO+EW8PMbdo5ejbiGnyjeVFpdhOM2ff3Y9CUCjxU7djtWQfWVUPaIkgFc6+CCLFA5+AJGAPlyRtqWKK9rqtBUNv6Yem0hzvbnXbe8dY0huB+KxTKspbfkqHafSEBGIJAlfyzxI05eTuMzHqVDnLjiX6sjDDW/65kYgZSs60iHf5a+B8EF7M1koRQOFip52S9xGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zcxIzM75O/HDUiRu5IUpHdr9KrZn3x/GQwbEL8/sAWY=; b=f3OMf7Zd3n/AsRQIxPBkzpMMfj0AKAjjvKfUYUS1TSnbWMR2M5vEvG5jgaqtxCXS1rdmyUCsIEU/iiErcPmeGLfKmRS0jQ3sMh2uM9mlZXGBp1x9OR2R8COL+G99tvwRuS5Y98pRq7Fv5Scwk+uJboCjXZwwqSXbbGQQtDUHJFGFHePL5tQYYpOjbPz5qRzt/HNO3x2SgugWsTY0yWduPj2OzabEG6VWJ6hrR1XRWYZAjADuR+5nWENvboxS3MUAw/mfUKnro5fmy0l2o0LxLSMri2mAYO7P/XV4cDUkuch8MHbs4ow85VoJrFbtmQZHJOGwWjkeUndzznWCJZ4V+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zcxIzM75O/HDUiRu5IUpHdr9KrZn3x/GQwbEL8/sAWY=; b=pYj9x6raLaKjKMTkb/+4MDiZX/fn4m5ZK5g9edQCd3+dfQSLiWPoXvV2StTINRpeC5oAe10zzg0xcF9lOTw/DZ7W0xziXkntjuFq9f+g1uAYTfEme8u/TBKCtXjwleT/J7TlApGgFfiEsFGyc55WR4rRaNKJDAs4bY5aI5H+fVhapzzLBP5nto8n+5UvoZD4IOa7r32t4dfCk0RcpFpskyzVw+zMc3WVmZeXbKD9GjsLKbay7vjrBnoSOfbkxhuTQvPZSvR0RF807e8XYK/SRB4gmZ/M5qHHKR6oX2yCA6e81O4Ae7qGIj4le7+dwaOGvgJad7l7O0kEoduvvsehjA== Received: from PH0PR08MB7020.namprd08.prod.outlook.com (2603:10b6:510:74::15) by DS4PR08MB11086.namprd08.prod.outlook.com (2603:10b6:8:2fc::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9745.27; Sun, 29 Mar 2026 05:37:48 +0000 Received: from PH0PR08MB7020.namprd08.prod.outlook.com ([fe80::7aaa:aad:cf15:9ce0]) by PH0PR08MB7020.namprd08.prod.outlook.com ([fe80::7aaa:aad:cf15:9ce0%5]) with mapi id 15.20.9745.025; Sun, 29 Mar 2026 05:37:47 +0000 From: Boris Mironov To: "pgsql-docs@lists.postgresql.org" Subject: Request for cleaner explanation of default_toast_compression parameter Thread-Topic: Request for cleaner explanation of default_toast_compression parameter Thread-Index: AQHcvzxyNYWyqqTAjUyZVeEAJn48iQ== Date: Sun, 29 Mar 2026 05:37:47 +0000 Message-ID: Accept-Language: en-CA, en-US Content-Language: en-CA X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR08MB7020:EE_|DS4PR08MB11086:EE_ x-ms-office365-filtering-correlation-id: df33008b-616b-40cc-94b0-08de8d554f2d x-microsoft-antispam: BCL:0;ARA:14566002|15030799006|15080799012|24071999003|37011999003|8060799015|8062599012|25031999004|31061999003|12050799012|461199028|39105399006|55001999003|20031999003|9400799043|19110799012|10035399007|440099028|3412199025|12091999003|102099032|40105399003; x-microsoft-antispam-message-info: =?iso-8859-1?Q?PJJAnM2/jRB+xFJnfnkbqtA8iTsyufjJEEDPci2rF1Vk/UfwpNyZRo/GiJ?= =?iso-8859-1?Q?UVuDGB5JekUuoEfx48SgFHn1aCswxHi3VncrKSFROLlzOcEIGjcdKSmo2s?= =?iso-8859-1?Q?gH7QG6vnTAw9LPqSvLR36eb3unmwaHw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859-1?Q?3tmjNiSK/8Sma3yojZXPSZ5yr7k0ufroEWQmf1KwmtVC6/Da1Rp9I55zv6?= =?iso-8859-1?Q?AjENnQCCH5SrH76CEZ231Pq4blVDTDSP6Vn/duiprlG2PnEQctTd1Q4qbf?= =?iso-8859-1?Q?BJW8uvUkzyIRZR6CswocwrwVPmW2ua0w5K7Au0am9JmhXpmlEFrwWeLL9c?= =?iso-8859-1?Q?KeCCdr2vFV0rZCj5JY+6a5JgJAun9LeERVEhwfZ6YBXC/HqPt7Vizo8SA/?= =?iso-8859-1?Q?hcsZxK9eX+GE2el9OOpQ=3D=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?5SE1eNl+VHPuoAbqpjtWKXJMHC0qM+GUV30w08O9vsN52tGAT6zbffueE1?= =?iso-8859-1?Q?GkTPY3e1J3IAkj/m0J5VU1Hf+B0XbM3ZMO9e2ut6k7ADfPyNWct8Vkmb3F?= =?iso-8859-1?Q?skAMknBA9VapU1/KmEFiTcfCvbtngNS1cO57q2qeywd/F4a0X6cEYUXNoH?= =?iso-8859-1?Q?CyCjT1UQLHjjwyN5VvdESYEMjDRc68HhyeR51mIgyPc4bW8bR7b53hkvXf?= =?iso-8859-1?Q?mk2OHmoI9SnzMDWX/XFSA9ZxvIUHiP1gbuefbacfwMWJ4RVOz+QwQqj5JD?= =?iso-8859-1?Q?xOU5OvxNcwk6RjfiRhzMI+piR4zxuzhj/hOFIqREzuVYw6fPlPhxqnCBr8?= =?iso-8859-1?Q?dQ+0WieMsTUOWsmRGnF9RZvdrHwcOBFiXwc0XiNtxvAZ4SXdIVJYfm+RZH?= =?iso-8859-1?Q?/bJQLAmXFsZG+omgDEDW0ssruQTpDUzB2RiDn4GQKy9NEd101/1zg7NKDj?= =?iso-8859-1?Q?c9ZMUEvZju50g/8DBmac869ppZhElnN4cpusGs/SSOymjCr3m93Y+5jW6o?= =?iso-8859-1?Q?ID/gZSMYGBO6A4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q?ZpQH7QLYngmkH1eHs4OP4y3AYpXvAuRGSYZdIw=3D=3D?= Content-Type: multipart/alternative; boundary="_000_PH0PR08MB7020D7A95CD8F730946B2DA08855APH0PR08MB7020namp_" MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR08MB7020.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: df33008b-616b-40cc-94b0-08de8d554f2d X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Mar 2026 05:37:47.3230 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS4PR08MB11086 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_PH0PR08MB7020D7A95CD8F730946B2DA08855APH0PR08MB7020namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, I would like to request a cleaner explanation of default_toast_compression = parameter. It could be just me, but following sentence could be misread: "This variable sets the default TOAST compression method for values of compressible columns." (https://www.postgresql.org/docs/18/runtime-config-client.html#GUC-DEFAULT-= TOAST-COMPRESSION) The way I read it (and perhaps I'm not the only one): "If column value is t= oo big to be stored in-row it goes to TOAST and gets compressed with algori= thm set by default_toast_compression parameter" This leads to the suggestion that initially this column gets compressed by = pglz as default algo and if tuple is bigger than 2000 bytes, the column get= s compressed with algo defined by default_toast_compression and saved into = the TOAST table. This raises suggestion about compressing same string data = twice when default_toast_compression=3Dlz4: 1. in an attempt to save string in-tuple with pglz; 2. with lz4 to save it in the TOAST table. Perhaps something like following will avoid misreading: "This variable sets the default compression method for values of compressib= le columns to be stored in-tuple or TOAST table." Best regards, Boris --_000_PH0PR08MB7020D7A95CD8F730946B2DA08855APH0PR08MB7020namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello,

I would like to request a cleaner explanation of default_toast_compression = parameter. It could be just me, but following sentence could be misread:

"This variable sets the default TOAST compression method for values of compressible columns."

The way I read it (and perhaps I'm not the only one): "If column value= is too big to be stored in-row it goes to TOAST and gets compressed with a= lgorithm set by default_toast_compression parameter"

This leads to the suggestion that initially this column gets compressed by = pglz as default algo and if tuple is bigger than 2000 bytes, the column get= s compressed with algo defined by default_toast_compression and saved into = the TOAST table. This raises suggestion about compressing same string data twice when default_toast_compression=3D= lz4:
  1. in an attempt to save string in-tuple with pglz;
  2. with lz4 to save it in the TOAST table.

Perhaps something like following will avoid misreading:

"This variable sets the default compression method for values of compr= essible columns to be stored in-tuple or TOAST table."

Best regards,
Boris

--_000_PH0PR08MB7020D7A95CD8F730946B2DA08855APH0PR08MB7020namp_--