Re: tackling full page writes

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: tackling full page writes
Date: 2011-05-25 03:52:33
Message-ID: 201105250352.p4P3qXk26039@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
> 2. The other fairly obvious alternative is to adjust our existing WAL
> record types to be idempotent - i.e. to not rely on the existing page
> contents. For XLOG_HEAP_INSERT, we currently store the target tid and
> the tuple contents. I'm not sure if there's anything else, but we
> would obviously need the offset where the new tuple should be written,
> which we currently infer from reading the existing page contents. For
> XLOG_HEAP_DELETE, we store just the TID of the target tuple; we would
> certainly need to store its offset within the block, and maybe the
> infomask. For XLOG_HEAP_UPDATE, we'd need the old and new offsets and
> perhaps also the old and new infomasks. Assuming that's all we need
> and I'm not missing anything (which I won't bet on), that means we'd
> be adding, say, 4 bytes per insert or delete and 8 bytes per update.
> So, if checkpoints are spread out widely enough that there will be
> more than ~2K operations per page between checkpoints, then it makes
> more sense to just do a full page write and call it good. If not,
> this idea might have legs.

I vote for "wal_level = idempotent" because so few people will know what
idempotent means. ;-)

Idempotent does seem like the most promising idea.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2011-05-25 04:42:19 The way to know whether the standby has caught up with the master
Previous Message Alvaro Herrera 2011-05-25 03:47:18 Re: Pre-alloc ListCell's optimization