Re: Is it possible to make a streaming replication faster using COPY instead of lots of INSERTS? - Mailing list pgsql-general

From Sergey Konoplev
Subject Re: Is it possible to make a streaming replication faster using COPY instead of lots of INSERTS?
Date
Msg-id CAL_0b1tv1_NAiwNDx0RPMoYzowjyDVRH_uLUvoVpaAdpX+tHWQ@mail.gmail.com
Whole thread Raw
In response to Re: Is it possible to make a streaming replication faster using COPY instead of lots of INSERTS?  (Craig Ringer <ringerc@ringerc.id.au>)
List pgsql-general
On 1 December 2011 03:44, Craig Ringer <ringerc@ringerc.id.au> wrote:
> 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.

My thought was about saving bytes on the information about transaction
starts, rollbacks and commits. I case of lost of small inserts each in
different transaction I suppose there will be more data like this.

> 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.

Thank you for the advice.

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



--
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 by date:

Previous
From: Venkat Balaji
Date:
Subject: Re: How to restore the table space tar files created by pg_basebackup?
Next
From: Sergey Konoplev
Date:
Subject: Re: Is it possible to make a streaming replication faster using COPY instead of lots of INSERTS?