Re: AdvanceXLInsertBuffer vs. WAL segment compressibility
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: Chapman Flack <chap@anastigmatix.net>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2016-08-02T19:51:06Z
Lists: pgsql-hackers
On Tue, Aug 2, 2016 at 2:33 PM, Bruce Momjian <bruce@momjian.us> wrote: > On Tue, Jul 26, 2016 at 05:42:43PM -0400, Chapman Flack wrote: >> Even so, I'd be curious whether it would break anything to have >> xlp_pageaddr simply set to InvalidXLogRecPtr in the dummy zero >> pages written to fill out a segment. At least until it's felt >> that archive_timeout has been so decidedly obsoleted by streaming >> replication that it is removed, and the log-tail zeroing code >> with it. >> >> That at least would eliminate the risk of anyone else repeating >> my astonishment. :) I had read that 9.4 added built-in log-zeroing >> code, and my first reaction was "cool! that may make the compression >> technique we're using unnecessary, but certainly can't make it worse" >> only to discover that it did, by ~ 300x, becoming now 3x *worse* than >> plain gzip, which itself is ~ 100x worse than what we had. > > My guess is that the bytes are there to detect problems where a 512-byte > disk sector is zeroed by a disk failure. I don't see use changing that > for the use-case you have described. Is there actually any code that makes such a check? I'm inclined to doubt that was the motivation, though admittedly we're both speculating about the contents of Heikki's brain, a tricky proposition on a good day. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Ensure that WAL pages skipped by a forced WAL switch are zero-filled.
- 4a33bb59dfc3 11.0 landed
-
Improve scalability of WAL insertions.
- 9a20a9b21baa 9.4.0 cited
-
Move BKP_REMOVABLE bit from individual WAL records to WAL page headers.
- 2dd9322ba6ee 9.2.0 cited