On 2014-11-11 17:10:01 +0900, Michael Paquier wrote: > On Mon, Nov 10, 2014 at 5:26 PM, Michael Paquier > <michael.paqu...@gmail.com> wrote: > > I'll go through the patch once again a bit later, but feel free to comment.
> Reading again the patch with a fresher mind, I am not sure if the > current approach taken is really the best one. What the patch does now > is looking at the header of the first backup block, and then > compresses the rest, aka the other blocks, up to 4, and their headers, > up to 3. I think that we should instead define an extra bool flag in > XLogRecord to determine if the record is compressed, and then use this > information. Attaching the compression status to XLogRecord is more > in-line with the fact that all the blocks are compressed, and not each > one individually, so we basically now duplicate an identical flag > value in all the backup block headers, which is a waste IMO. I don't buy the 'waste' argument. If there's a backup block those up bytes won't make a noticeable difference. But for the majority of record where there's no backup blocks it will. The more important thing here is that I see little chance of this getting in before Heikki's larger rework of the wal format gets in. Since that'll change everything around anyay I'm unsure how much point there is to iterate till that's done. I know that sucks, but I don't see much of an alternative. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers