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.94.2) (envelope-from ) id 1tZp4Z-00DNaY-PZ for pgsql-admin@arkaria.postgresql.org; Mon, 20 Jan 2025 10:32:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tZp4Y-000c6f-DT for pgsql-admin@arkaria.postgresql.org; Mon, 20 Jan 2025 10:31:58 +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.94.2) (envelope-from ) id 1tZp4Y-000c6X-1I for pgsql-admin@lists.postgresql.org; Mon, 20 Jan 2025 10:31:58 +0000 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tZp4V-000X9r-3B for pgsql-admin@lists.postgresql.org; Mon, 20 Jan 2025 10:31:57 +0000 Received: by mail-qt1-x832.google.com with SMTP id d75a77b69052e-46901d01355so44101611cf.0 for ; Mon, 20 Jan 2025 02:31:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lelarge-info.20230601.gappssmtp.com; s=20230601; t=1737369115; x=1737973915; darn=lists.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=yZVDsVh1phwQlQt3sYY5SGrmwhm0q61m5iFKtCp+37Y=; b=KUB4B3QNLFxF+K9FhCcgRtar6IYiVWTgymxCIHbzl/MBCRspej47PcDfoPbWu8zSPU lBwdOkvYfKVM3TbvJGlKWqg3u74hQ8dzZFkUVHESwapSNXCxcwMvZ0ukI5tgV+l6ccC6 1jfE7pKtTPhjqGLtnQ2+vqfBYC3urv1dg49jhUSKW1F9jc26MEYCkVz8xmSI41OXWTQc N6azKV7qc6cVHvRrjbj3adVx/oLgwTzlCMI2BV6avSrK/IbqT8Ny0EjGSh3gvAIUd+Ho idIEXfmAUTcHaehg8IIq5ZvOSSb2QsP68fqqi8XN7GyLX5D4/Gp3H4BEMJjYXb+ez3I9 hwqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737369115; x=1737973915; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yZVDsVh1phwQlQt3sYY5SGrmwhm0q61m5iFKtCp+37Y=; b=jZoAe2xzciilsMDZVDruV6x8rMkADVIrr1xbhu2YbZoU7O0AuPJP5PnjQiMK4/RDnM iTZMYTm8XSOAvHMgaX8/WYRpA9bPgshU6LgyI84g4f7jAQcJcmeYdQpxhonmeXZE9i+6 d6byO1m8kmeFVBCdGQPaov5SGaqIAtiN8+m7uZ0OKt+/lVKCd0PckJiCd/q+oIafIwo2 pZAgH0mAlICGg9wJ2b9XXZJ2mYZ6qxSc2Wx3dvIWG4oGOoGn/MQR7kDbvxTH/aci48lL 9dNc8xJaY4YeZvHbrk1nZf+vQ1MTfh/t+9ZeEsmHgPngRWeCBbPe5PSuyAMNvt77Giai PCGA== X-Gm-Message-State: AOJu0YzFuqlwVZO/Ar5Ccm3XYAQVsNFIYarqLkldVP1NMQaRVpjc5Ldc ZcqR0WCvlKwWbQNHDDrfXBELUq4MpCzn1cA50opRukrcUkbUaRkbCh5bVuUF48FeXVHNFuEr31i Gvw4m+lRy0+ZFoD+yOTDRD2eOJnk4CJsvXdztUA== X-Gm-Gg: ASbGncuMLBez3WtKSCltoXnl5MN4an0JmjrJaC/CCfHTC7x/+0xkzw4jL6xITTnmHrZ kSo9fl9xUHSmuZpJOoZYZO78KzKZ+ItLaD+kU3sjXr3Vsh21u3dkJa0vMriIPzBrl1qUNKJBZM3 esXLVsmVmzag== X-Google-Smtp-Source: AGHT+IHJOcwVC/lSE5Rg61kGFjpJhVxsRIsgzIF0Ai54grjOnkKYCZpbNZoqPdTnvlpPvPVWZVH13ySQiGe5QxRAlQw= X-Received: by 2002:a05:622a:1817:b0:467:70ce:75f5 with SMTP id d75a77b69052e-46e12b90e53mr195802701cf.37.1737369115549; Mon, 20 Jan 2025 02:31:55 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Guillaume Lelarge Date: Mon, 20 Jan 2025 11:31:44 +0100 X-Gm-Features: AbW1kvaQHUKqIgIUBJhf7LEN5dZ72Xh-N6n7_C5JcE3Z_2-KHXKtLHTGNLciAB4 Message-ID: Subject: Re: wal_compression To: Fabrice Chapuis Cc: pgsql-admin@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000f9fca8062c20c49d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000f9fca8062c20c49d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Le lun. 20 janv. 2025 =C3=A0 11:23, Fabrice Chapuis a =C3=A9crit : > In Postgres 17 doc, for wal_compression parameter it's written: > "Turning this parameter on can reduce the WAL volume without increasing > the risk of unrecoverable data corruption" > If wal_compression =3D on then when a full page is written in the wal, it > will be compressed. What I do not understand is that the wal file keeps t= he > same size 16Mb. What is the interest to activate wal_compression? > > A WAL file contains some records. Usually a lot of records. If a record is compressed, it will take less space in the WAL file. Hence, this WAL file will contain more records, and you will need less WAL files for the same activity. --=20 Guillaume. --000000000000f9fca8062c20c49d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

Le=C2=A0lun.= 20 janv. 2025 =C3=A0=C2=A011:23, Fabrice Chapuis <fabrice636861@gmail.com> a =C3=A9crit=C2=A0:
=
In Postgres 17 doc, for wal_compr= ession parameter it's written:
"Turning this parameter on can reduce the WAL volume without = increasing the risk of unrecoverable data corruption"
If=C2=A0wal_compression=C2=A0=3D o= n then when a full page is written in the wal, it will be compressed. What = I do not understand is that the wal file keeps the same size 16Mb. What is = the interest to activate wal_compression?


A WAL file contains some records. Usually a lot of records. If a record = is compressed, it will take less space in the WAL file. Hence, this WAL fil= e will contain more records, and you will need less WAL files for the same = activity.


--
=
Guillaume.
--000000000000f9fca8062c20c49d--