pgsql: Ensure that WAL pages skipped by a forced WAL switch are zero-fi

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Ensure that WAL pages skipped by a forced WAL switch are zero-fi
Date: 2018-03-30 20:18:26
Message-ID: E1f20Ti-0002BY-In@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Ensure that WAL pages skipped by a forced WAL switch are zero-filled.

In the previous coding, skipped pages were mostly zeroes, but they still
had valid WAL page headers. That makes them very much less compressible
than an unbroken string of zeroes would be --- about 10X worse for bzip2
compression, for instance. We don't need those headers, so tweak the logic
so that we zero them out.

Chapman Flack, reviewed by Daniel Gustafsson

Discussion: https://postgr.es/m/579297F8.7020107@anastigmatix.net

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4a33bb59dfc33566f04e18ab5e1f90b8e7461052

Modified Files
--------------
src/backend/access/transam/xlog.c | 44 ++++++++++++++++++++++++++++-----------
1 file changed, 32 insertions(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-03-30 22:15:30 pgsql: Fix bogus provolatile/proparallel markings on a few built-in fun
Previous Message Tom Lane 2018-03-30 19:11:44 pgsql: Remove obsolete SLRU wrapping and warnings from predicate.c.