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

Поиск
Список
Период
Сортировка
От Sergey Konoplev
Тема Is it possible to make a streaming replication faster using COPY instead of lots of INSERTS?
Дата
Msg-id CAL_0b1u213XJczQ872_xrVBRLwPsFdcuzaCY2wu5K_Yz3myFVQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Is it possible to make a streaming replication faster using COPY instead of lots of INSERTS?  (Craig Ringer <ringerc@ringerc.id.au>)
Список pgsql-general
Hi,

An application server does a lot of small inserts on several tables
(kind of users activity logging) in my database. These inserts are
creating a lot of (if not the most of) the traffic on the server. The
server has a hot standby replica working through a very slow channel
between them.

When the amount of this inserts increases the master does not manage
to send such a big stream of changes (because of the low bandwidth) to
the replica in time and the lag between them grows up dramatically.

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?

PostgreSQL version is 9.0.4 on both servers. If you need more
specifics about the configuration just let me know what exactly.

Thank you very much in advance.

--
Sergey Konoplev

Blog: http://gray-hemp.blogspot.com
LinkedIn: http://ru.linkedin.com/in/grayhemp
JID/GTalk: gray.ru@gmail.com Skype: gray-hemp

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

Предыдущее
От: Samba
Дата:
Сообщение: How to restore the table space tar files created by pg_basebackup?
Следующее
От: BK
Дата:
Сообщение: Re: Strange problem with turning WAL archiving on