Re: Is it possible to make a streaming replication faster using COPY instead of lots of INSERTS?

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Is it possible to make a streaming replication faster using COPY instead of lots of INSERTS?
Дата
Msg-id 4ED6BFED.6090302@ringerc.id.au
обсуждение исходный текст
Ответ на Is it possible to make a streaming replication faster using COPY instead of lots of INSERTS?  (Sergey Konoplev <gray.ru@gmail.com>)
Ответы Re: Is it possible to make a streaming replication faster using COPY instead of lots of INSERTS?  (David Johnston <polobo@yahoo.com>)
Re: Is it possible to make a streaming replication faster using COPY instead of lots of INSERTS?  (Sergey Konoplev <gray.ru@gmail.com>)
Список pgsql-general
On 11/30/2011 10:32 PM, Sergey Konoplev wrote:
> Would it be more compact from the point of view of streaming
> replication if we make the application accumulate changes and do one
> COPY instead of lots of INSERTS say once a minute? And if it will be
> so how to estimate the effect approximately?
Streaming replication works on a rather lower level than that. It
records information about transaction starts, rollbacks and commits, and
records disk block changes. It does not record SQL statements. It's not
using INSERT, so you can't switch to COPY. Streaming replication
basically just copies the WAL data, and WAL data is not all that compact.

Try to run streaming replication over a compressed channel. PostgreSQL
might gain the ability to do this natively - if someone cares enough to
implement it and if it doesn't already do it without my noticing - but
in the mean time you can use a compressed SSH tunnel, compressed VPN, etc.

Alternately, investigate 3rd party replication options like Slony and
Bucardo that might be better suited to your use case.

--
Craig Ringer

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Query Optimizer makes a poor choice
Следующее
От: David Johnston
Дата:
Сообщение: Re: Is it possible to make a streaming replication faster using COPY instead of lots of INSERTS?