Re: [FEATURE REQUEST] Streaming Onlinebackup (Maybe OFFTOPIC)

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: "Jeff Davis" <pgsql(at)j-davis(dot)com>,<pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [FEATURE REQUEST] Streaming Onlinebackup (Maybe OFFTOPIC)
Date: 2007-09-26 23:09:55
Message-ID: 46FAA072.EE98.0025.0@wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>> On Wed, Sep 26, 2007 at 3:14 PM, in message
<1190837675(dot)4181(dot)716(dot)camel(at)ebony(dot)site>, Simon Riggs <simon(at)2ndquadrant(dot)com>
wrote:
>
> The logic for zeroing the blocks makes me nervous. It doesn't locate the
> block from which to start, it treats all blocks equally, so might zero
> some blocks and not others. What you have should work, but I'd be
> inclined to put a test in there to check that doesn't happen: once we
> begin to zero pages, all of them should be zeroed to end of file. If we
> find one that shouldn't be zeroed, throw an error.
>
> We should also document that this is designed to help compress files
> that aren't full because we switched early because of archive_timeout.

Attached is a modified version to implement both of these. I also bailed
out if there was surplus input. I tried an optimization of allocating a
separate buffer for outputting the zeros, to avoid repeated memset calls.
It didn't seem to make a very big difference; do you think it's worth
cluttering the code with that?

-Kevin

Attachment Content-Type Size
pg_clearxlogtail.c application/octet-stream 4.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-09-26 23:33:03 Re: [HACKERS] Document and/or remove unreachable code in tuptoaster.c from varvarlena patch
Previous Message Kevin Grittner 2007-09-26 21:31:06 Re: [FEATURE REQUEST] Streaming Onlinebackup (Maybe OFFTOPIC)