Re: [FEATURE REQUEST] Streaming Onlinebackup (Maybe OFFTOPIC) - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: [FEATURE REQUEST] Streaming Onlinebackup (Maybe OFFTOPIC)
Date
Msg-id 46FAA072.EE98.0025.0@wicourts.gov
Whole thread Raw
In response to Re: [FEATURE REQUEST] Streaming Onlinebackup (Maybe OFFTOPIC)  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: [FEATURE REQUEST] Streaming Onlinebackup (MaybeOFFTOPIC)
List pgsql-hackers
>>> On Wed, Sep 26, 2007 at  3:14 PM, in message
<1190837675.4181.716.camel@ebony.site>, Simon Riggs <simon@2ndquadrant.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

pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: [FEATURE REQUEST] Streaming Onlinebackup (Maybe OFFTOPIC)
Next
From: "Florian G. Pflug"
Date:
Subject: Re: [FEATURE REQUEST] Streaming Onlinebackup (Maybe OFFTOPIC)