Re: [FEATURE REQUEST] Streaming Onlinebackup (Maybe OFFTOPIC)
| От | Kevin Grittner |
|---|---|
| Тема | Re: [FEATURE REQUEST] Streaming Onlinebackup (Maybe OFFTOPIC) |
| Дата | |
| Msg-id | 46FAA072.EE98.0025.0@wicourts.gov обсуждение исходный текст |
| Ответ на | Re: [FEATURE REQUEST] Streaming Onlinebackup (Maybe OFFTOPIC) (Simon Riggs <simon@2ndquadrant.com>) |
| Ответы |
Re: [FEATURE REQUEST] Streaming Onlinebackup (MaybeOFFTOPIC)
|
| Список | 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
Вложения
В списке pgsql-hackers по дате отправления: