pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Koichi Suzuki <suzuki.koichi@oss.ntt.co.jp>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: Zeugswetter Andreas ADI SD <ZeugswetterA@spardat.at>
Cc: pgsql-hackers@postgresql.org
Cc: pgsql-patches@postgresql.org
Subject: Re: [PATCHES] Full page writes improvement, code update
Date: Sun, 20 May 2007 17:16:10 -0400
Message-ID: <17092.1179695770@sss.pgh.pa.us> (raw)
In-Reply-To: <463F1F32.5070707@oss.ntt.co.jp>
References: <460886E8.6040907@oss.ntt.co.jp>
	<200704240831.42873.josh@agliodbs.com>
	<E1539E0ED7043848906A8FF995BDA57901F40143@m0143.s-mxs.net>
	<200704251127.13624.josh@agliodbs.com>
	<6292.1177538104@sss.pgh.pa.us>
	<463F1F32.5070707@oss.ntt.co.jp>

Koichi Suzuki <suzuki.koichi@oss.ntt.co.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



view thread (64+ messages)  latest in thread

Message-ID: <17092.1179695770@sss.pgh.pa.us>
Permalink:  ../17092.1179695770@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17092.1179695770@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, suzuki.koichi@oss.ntt.co.jp, josh@agliodbs.com, ZeugswetterA@spardat.at, pgsql-patches@postgresql.org
  Subject: Re: [PATCHES] Full page writes improvement, code update
  In-Reply-To: <17092.1179695770@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox