Thread

Commits

  1. Document wal_compression=on

  1. [PATCH] Document wal_compression=on

    Christoph Berg <myon@debian.org> — 2026-06-29T10:04:13Z

    The docs currently don't say what wal_compression=on is, so here is a
    patch.
    
    Christoph
    
  2. Re: [PATCH] Document wal_compression=on

    John Naylor <johncnaylorls@gmail.com> — 2026-06-29T10:41:27Z

    On Mon, Jun 29, 2026 at 5:04 PM Christoph Berg <myon@debian.org> wrote:
    >
    > The docs currently don't say what wal_compression=on is, so here is a
    > patch.
    
    +1 for documenting this.
    
    +        The value <literal>on</literal> is a deprecated alias for
    <literal>pglz</literal>.
    
    "deprecated" implies we may remove it someday. I don't think we'd gain
    from doing that, but we could instead call 'on' a "historical
    spelling" of 'pglz'.
    
    -- 
    John Naylor
    Amazon Web Services
    
    
    
    
  3. Re: [PATCH] Document wal_compression=on

    Christoph Berg <myon@debian.org> — 2026-06-29T14:16:04Z

    Re: John Naylor
    > +        The value <literal>on</literal> is a deprecated alias for
    > <literal>pglz</literal>.
    > 
    > "deprecated" implies we may remove it someday. I don't think we'd gain
    > from doing that, but we could instead call 'on' a "historical
    > spelling" of 'pglz'.
    
    Or perhaps leave the door open for picking a better default in the future?
    
         The value <literal>on</literal> is currently an alias for <literal>pglz</literal>.
    
    (I would be fine with either of the 3 variants.)
    
    Maybe we should also update the postgresql.conf.sample:
    
     #wal_compression = off                  # enables compression of full-page writes;
    -                                        # off, pglz, lz4, zstd, or on
    +                                        # off, pglz (or on), lz4, or zstd
    
    (Or just delete it there.)
    
    Christoph
    
    
    
    
  4. Re: [PATCH] Document wal_compression=on

    Michael Paquier <michael@paquier.xyz> — 2026-06-30T03:53:22Z

    On Mon, Jun 29, 2026 at 05:41:27PM +0700, John Naylor wrote:
    > +        The value <literal>on</literal> is a deprecated alias for
    > <literal>pglz</literal>.
    > 
    > "deprecated" implies we may remove it someday. I don't think we'd gain
    > from doing that, but we could instead call 'on' a "historical
    > spelling" of 'pglz'.
    
    +1.
    --
    Michael
    
  5. Re: [PATCH] Document wal_compression=on

    wenhui qiu <qiuwenhuifx@gmail.com> — 2026-06-30T09:27:40Z

    > Hi
    >
    > The recent PostgreSQL commit changes the default TOAST compression to lz4 when
    > LZ4 support is available, based on the rationale that LZ4 is generally more
    > efficient than pglz in terms of CPU usage and compression ratio.Given
    > that, should we also consider changing the default compression method used
    > by wal_compression = on from pglz to lz4?
    >
    Currently, wal_compression = on still maps to pglz, while lz4 has to be
    > selected explicitly with:
    >
    > wal_compression = lz4
    >
    > If LZ4 is now considered stable and preferable enough to become the
    > default for TOAST compression, it may be worth aligning WAL compression
    > behavior as well, or at least discussing whether on should continue to
    > imply pglz.
    >
    
    
    
    Thanks
    
  6. Re: [PATCH] Document wal_compression=on

    John Naylor <johncnaylorls@gmail.com> — 2026-06-30T09:48:53Z

    On Tue, Jun 30, 2026 at 4:27 PM wenhui qiu <qiuwenhuifx@gmail.com> wrote:
    
    >> The recent PostgreSQL commit changes the default TOAST compression to lz4 when LZ4 support is available, based on the rationale that LZ4 is generally more efficient than pglz in terms of CPU usage and compression ratio.Given that, should we also consider changing the default compression method used by wal_compression = on from pglz to lz4?
    
    FYI, default value of wal_compression is "off".
    
    --
    John Naylor
    Amazon Web Services
    
    
    
    
  7. Re: [PATCH] Document wal_compression=on

    Christoph Berg <myon@debian.org> — 2026-06-30T09:57:20Z

    Re: John Naylor
    > FYI, default value of wal_compression is "off".
    
    Still, there is value in being consistent. If default_toast_compression=lz4
    and I turn wal_compression "on", I would also accept lz4 there.
    
    We are picking the best toast compression algorithm by default, we
    should also do that for wal.
    
    Christoph
    
    
    
    
  8. Re: [PATCH] Document wal_compression=on

    John Naylor <johncnaylorls@gmail.com> — 2026-06-30T10:07:13Z

    On Tue, Jun 30, 2026 at 4:57 PM Christoph Berg <myon@debian.org> wrote:
    >
    > Re: John Naylor
    > > FYI, default value of wal_compression is "off".
    >
    > Still, there is value in being consistent. If default_toast_compression=lz4
    > and I turn wal_compression "on", I would also accept lz4 there.
    >
    > We are picking the best toast compression algorithm by default, we
    > should also do that for wal.
    
    The thread subject is about documenting the state of affairs that have
    existed since PG15. If you want to propose a change in behavior for
    master, that's material for a separate thread.
    
    -- 
    John Naylor
    Amazon Web Services
    
    
    
    
  9. Re: [PATCH] Document wal_compression=on

    Christoph Berg <myon@debian.org> — 2026-06-30T10:19:21Z

    Re: To John Naylor
    > Or perhaps leave the door open for picking a better default in the future?
    > 
    >      The value <literal>on</literal> is currently an alias for <literal>pglz</literal>.
    
    > Maybe we should also update the postgresql.conf.sample:
    
    I'm attaching v2 that implements this (without the "currently").
    
    Christoph
    
  10. Re: [PATCH] Document wal_compression=on

    John Naylor <johncnaylorls@gmail.com> — 2026-07-01T02:19:57Z

    On Tue, Jun 30, 2026 at 5:19 PM Christoph Berg <myon@debian.org> wrote:
    > >
    > >      The value <literal>on</literal> is currently an alias for <literal>pglz</literal>.
    >
    > > Maybe we should also update the postgresql.conf.sample:
    >
    > I'm attaching v2 that implements this (without the "currently").
    
    I pushed this with the change of using the language "historical
    spelling" as mentioned upthread.
    
    -- 
    John Naylor
    Amazon Web Services