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 1vMPOn-008y0b-1M for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Nov 2025 11:33:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vMPOk-006sqP-2U for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Nov 2025 11:33:55 +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 1vMPOk-006sqG-1R for pgsql-hackers@lists.postgresql.org; Fri, 21 Nov 2025 11:33:54 +0000 Received: from mail-ot1-x32d.google.com ([2607:f8b0:4864:20::32d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vMPOi-000iH0-0N for pgsql-hackers@postgresql.org; Fri, 21 Nov 2025 11:33:54 +0000 Received: by mail-ot1-x32d.google.com with SMTP id 46e09a7af769-7c77ed036c3so1445595a34.0 for ; Fri, 21 Nov 2025 03:33:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tigerdata.com; s=google; t=1763724829; x=1764329629; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=mQuYWM35q1a4dEVPKEdekfMAIJVX5MxDaXACgxIIluM=; b=JT15hxlupJUy8dLOzUMzwVPZhhH5TywU7aCwmfpRobMGNJiN+sq+wP1B9n3PkJKPVb LeeGOmhgZAeD6Y0q0wKuG229uE8Ha5/pDW0jcITaYHvqg7re0J6h9N0uluDfiXz+3eca 9/5ZYrC2oZlw38xz6iDKp0UGUl5JIOWwNuDOckcZBHPwyDZ7b1JsYGCFdDDopxeqY4iJ bjXH1ZbigfdXi/w1q2foMJAu9Tt8BhR8+ZtCM3REOzRMyqV2gePLbtV/tMsjErxgP8cU fKEC19O/5Kr42FQqFNO65OEk3ZpLV7aqFqlTITOOL9c+RK/6Nmy7BChHRqla7pdQLSq5 a6kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763724829; x=1764329629; h=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=mQuYWM35q1a4dEVPKEdekfMAIJVX5MxDaXACgxIIluM=; b=kTrZqJjXOowLhxKQFpq8zpU5uDXBd8D4eAXUPoCEIYnNM4uER3YO6T5EnVL+bnPNuT 9uWuIe49QZvB5x4fQYp/5wMGMcbklEZ8KHNdcx+cpd9c258M8WMPdinLc//NfNc4tBFm SoPQpJxSSg9DSL0xRRGUvsNCv8NykLy6Ay21P3AW0by7xNu1wHecok23creAib0P+caK iHOBH/RXtDjsfx2RlvjiCMNj33uzH3RpPEPwgZE3LdlkbIMBZLhxNndO/C0mP8LgSMSD lNxu+hlJGuecnUv5hUZ88sLpqSnfeND1ljij1aLzLCzrLCjp/75qDg0h4WOukAu+NZKv DVkw== X-Gm-Message-State: AOJu0YyVurEfmzABkncimvs7g8SMKLVVLCmo4agd+oX07uxfPE5uXU2f K+A7Uy1ZO78Xit+1aqrL4G66hZHm6JYyu4wVoueBOca1tDn+zj0nf11uCwwL66nAnHUvsyYk9uq MxnMYWNBqTo1D4YboTrvuov5Qzwhwc5wbwuFlbM5BXPaaUnstcH+oEM4= X-Gm-Gg: ASbGncuxeluWXojMm5zlzG0tLNrKgfMeOq9kEwzXcgAvf6nRIwp7+42YynQttEEccqp TpFZUcZIhl6Z57NYAEPSpRqEGPNL8M3wdvccZ0gBq1RG7O0ZE5sT/yKPkpM/9kbRs3UAXXEN4RK EB85ywqpxeQbOk8oCxdZk5RI4r98hqbR4GV8If4HU3UzA6Pf2AukEb59uhU56FlC6+CkZ8iEVym V/LEOa04gNnE3YLMUsrkW/Y26BK/xVuXRFqVW9PH8tNNdQD2Nh7NuALX6MqmI31mCeqaBX4 X-Google-Smtp-Source: AGHT+IHPlT7IMhN8VEN9Z5ZAYiR2jKOEtUAWFZfIsXOCKAqeRwJJDjlrlqHignm+P8DRvyc7VlKdxvSY0MEXIXqgr8Y= X-Received: by 2002:a9d:738c:0:b0:7c6:d01f:591b with SMTP id 46e09a7af769-7c78eb15f9fmr2339284a34.13.1763724829557; Fri, 21 Nov 2025 03:33:49 -0800 (PST) MIME-Version: 1.0 References: <435df33a-129e-4f0c-a803-f3935c5a5ecb@eisentraut.org> In-Reply-To: <435df33a-129e-4f0c-a803-f3935c5a5ecb@eisentraut.org> From: Aleksander Alekseev Date: Fri, 21 Nov 2025 14:33:38 +0300 X-Gm-Features: AWmQ_bmznUP6RwQdMKLpppxjkCto8EYfju23y10LhtnqcVrUDoiVCa4TaiHIWbQ Message-ID: Subject: Re: change default default_toast_compression to lz4? To: pgsql-hackers Cc: Peter Eisentraut Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Peter, > How about changing the default of default_toast_compression to lz4? To me it sounds like a great idea. > I have seen cases where servers had performance problems and were > CPU-bound because of pglz TOAST compression, and changing it to lz4 > relieved it significantly. I suspect many users are leaving easy > performance improvements on the table by not using this option. > > The feature was introduced in PostgreSQL 14, so it should be well > stabilized now. > > I suppose one issue is that lz4 support is not compiled-in by default, > but in practice most users will have it. The default could be lz4 if > lz4 support is built, otherwise pglz. This would be similar to other > parameters where the default is the best one depending on the build > configuration. Are there good reasons why we can't simply make lz4 a required dependency? In the worst case we could simply copy its implementation, the license permits. -- Best regards, Aleksander Alekseev