Re: [PATCH] COPY .. COMPRESSED

Поиск
Список
Период
Сортировка
От Claudio Freire
Тема Re: [PATCH] COPY .. COMPRESSED
Дата
Msg-id CAGTBQpbTpWKHo4upnFL8BrM4VvHn+Rw3nuU44HEsNj4AERcPdg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] COPY .. COMPRESSED  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, Jan 15, 2013 at 7:46 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Compressing every small packet seems like it'd be overkill and might
>> surprise people by actually reducing performance in the case of lots of
>> small requests.
>
> Yeah, proper selection and integration of a compression method would be
> critical, which is one reason that I'm not suggesting a plugin for this.
> You couldn't expect any-random-compressor to work well.  I think zlib
> would be okay though when making use of its stream compression features.
> The key thing there is to force a stream buffer flush (too lazy to look
> up exactly what zlib calls it, but they have the concept) exactly when
> we're about to do a flush to the socket.  That way we get cross-packet
> compression but don't have a problem with the compressor failing to send
> the last partial message when we need it to.

Just a "stream flush bit" (or stream reset bit) on the packet header
would do. First packet on any stream would be marked, and that's it.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: log_lock_waits to identify transaction's relation
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: transforms