<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi All;<br>
    <br>
    We are replicating from a PostgreSQL 9.2 database (our Master) to a
    PostgreSQL 9.4 database (our slave) - server encoding is UTF8<br>
    <br>
    The slon process for the slave has this entry:<br>
    <br>
    2015-12-22 11:28:31 CST ERROR  remoteWorkerThread_1: PQputCopyData()
    - server closed the connection unexpectedly<br>
        This probably means the server terminated abnormally<br>
        before or while processing the request.<br>
    2015-12-22 11:28:31 CST WARN   remoteWorkerThread_1: data copy for
    set 1 failed 1 times - sleep 15 seconds<br>
    FATAL:  invalid frontend message type 166<br>
    2015-12-22 11:28:31 CST ERROR  remoteWorkerThread_1: "rollback
    transaction" PGRES_FATAL_ERROR <br>
    2015-12-22 11:28:31 CST CONFIG slon: child terminated signal: 9;
    pid: 12450, current worker pid: 12450<br>
    2015-12-22 11:28:31 CST CONFIG slon: restart of worker in 10 seconds<br>
    <br>
    The process then begins to copy seemingly successful initial table
    sync's<br>
    however the postgresql log file has entries like this:<br>
    <br>
    <br>
    2015-12-22 14:56:05 UTC <i><b>[db name] [cluster name]</b></i>
    ERROR:  out of memory<br>
    2015-12-22 14:56:05 UTC  <i><b>[db name] [cluster name]</b></i>
    DETAIL:  Cannot enlarge string buffer containing 0 bytes by
    1572761385 more bytes.<br>
    2015-12-22 14:56:05 UTC  <i><b>[db name] [cluster name]</b></i>
    CONTEXT:  COPY <i><b>[table name] </b></i>, line 2332808<br>
    2015-12-22 14:56:05 UTC  <i><b>[db name] [cluster name]</b></i>
    STATEMENT:  select "_<i><b>[schema name]</b></i>".prepareTableForCopy(11);
    copy "public"."<i><b>[table name]</b></i>" <i><b>...</b></i>  from
    stdin;<br>
    <br>
    <br>
    <br>
    2015-12-22 14:56:05 UTC  <i><b>[db name] [cluster name]</b></i>
    LOG:  could not send data to client: Broken pipe<br>
    2015-12-22 14:56:05 UTC <i><b>[db name] [cluster name]</b></i>
    FATAL:  connection to client lost<br>
    2015-12-22 14:56:10 UTC  <i><b>[db name] [cluster name]</b></i>
    LOG:  could not send data to client: Broken pipe<br>
    2015-12-22 14:56:10 UTC  <i><b>[db name] [cluster name]</b></i>
    FATAL:  connection to client lost<br>
    2015-12-22 17:28:50 UTC  <i><b>[db name] [cluster name]</b></i>
    ERROR:  invalid byte sequence for encoding "UTF8": 0x9d<br>
    2015-12-22 17:28:50 UTC  <i><b>[db name] [cluster name]</b></i>
    CONTEXT:  COPY transcript_indices, line 35227547<br>
    2015-12-22 17:28:50 UTC  <i><b>[db name] [cluster name]</b></i>
    STATEMENT:  select "_<i><b>[schema name]</b></i>".prepareTableForCopy(7);
    copy "public"."<i><b>[table name]</b></i>" <i><b>...</b></i> from
    stdin;<br>
    2015-12-22 17:28:54 UTC <i><b>[db name] [cluster name]</b></i>
    FATAL:  invalid frontend message type 166<br>
    <br>
    <br>
    <br>
    Thoughts?<br>
    <br>
    Thanks in advance...<br>
    <br>
    <br>
  </body>
</html>