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

From: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>
To: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Is it possible to make a streaming replication faster using COPY instead of lots of INSERTS?
Date: 2011-12-01 08:05:16
Message-ID: CAL_0b1tv1_NAiwNDx0RPMoYzowjyDVRH_uLUvoVpaAdpX+tHWQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 1 December 2011 03:44, Craig Ringer <ringerc(at)ringerc(dot)id(dot)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(dot)ru(at)gmail(dot)com Skype: gray-hemp

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sergey Konoplev 2011-12-01 08:08:25 Re: Is it possible to make a streaming replication faster using COPY instead of lots of INSERTS?
Previous Message Venkat Balaji 2011-12-01 05:59:57 Re: How to restore the table space tar files created by pg_basebackup?