Skip site navigation (1) Skip section navigation (2)

Re: [PATCHES] Full page writes improvement, code update

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Koichi Suzuki <suzuki(dot)koichi(at)oss(dot)ntt(dot)co(dot)jp>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Zeugswetter Andreas ADI SD <ZeugswetterA(at)spardat(dot)at>, pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [PATCHES] Full page writes improvement, code update
Date: 2007-05-20 21:16:10
Message-ID: 17092.1179695770@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Koichi Suzuki <suzuki(dot)koichi(at)oss(dot)ntt(dot)co(dot)jp> writes:
> As replied to "Patch queue triage" by Tom, here's simplified patch to
> mark WAL record as "compressable", with no increase in WAL itself.
> Compression/decompression commands will be posted separately to PG
> Foundary for further review.

Applied with some minor modifications.  I didn't like the idea of
suppressing the sanity-check on WAL record length; I think that's
fairly important.  Instead, I added a provision for an XLOG_NOOP
WAL record type that can be used to fill in the extra space.
The way I envision that working is that the compressor removes
backup blocks and converts each compressible WAL record to have the
same contents and length it would've had if written without backup
blocks.  Then, it inserts an XLOG_NOOP record with length set to
indicate the amount of extra space that needs to be chewed up --
but in the compressed version of the WAL file, XLOG_NOOP's "data
area" is not actually stored.  The decompressor need only scan
the file looking for XLOG_NOOP and insert the requisite number of
zero bytes (and maybe recompute the XLOG_NOOP's CRC, depending on
whether you want it to be valid for the short-format record in the
compressed file).  There will also be some games to be played for
WAL page boundaries, but you had to do that anyway.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Nikolay SamokhvalovDate: 2007-05-20 21:24:48
Subject: Re: [PATCHES] build/install xml2 when configured with libxml
Previous:From: Andrew DunstanDate: 2007-05-20 19:45:54
Subject: Re: UTF8MatchText

pgsql-patches by date

Next:From: Nikolay SamokhvalovDate: 2007-05-20 21:24:48
Subject: Re: [PATCHES] build/install xml2 when configured with libxml
Previous:From: Andrew DunstanDate: 2007-05-20 19:45:54
Subject: Re: UTF8MatchText

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group