Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 08A71B5DBD0 for ; Mon, 4 Jul 2011 10:05:11 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 28152-09 for ; Mon, 4 Jul 2011 13:05:04 +0000 (UTC) X-Greylist: delayed 00:06:14.71333 by SQLgrey-1.7.6 Received: from smtp.mendix.nl (smtp.mendix.nl [82.94.188.23]) by mail.postgresql.org (Postfix) with ESMTP id 827F5B5DBCE for ; Mon, 4 Jul 2011 10:05:03 -0300 (ADT) Received: from tingle.hq.mendix.net (tingle.hq.mendix.net [213.201.131.107]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mendix.nl (Postfix) with ESMTPS id 0415C1C21 for ; Mon, 4 Jul 2011 14:58:45 +0200 (CEST) Received: from win-srv01.MENDIXDOMAIN.local (toad.kantoor.mendix.nl [10.140.10.18]) by tingle.hq.mendix.net (Postfix) with ESMTP id CA4334337 for ; Mon, 4 Jul 2011 14:58:45 +0200 (CEST) Received: from WIN-EXCHANGE-02.MENDIXDOMAIN.local ([10.140.10.10]) by win-srv01.MENDIXDOMAIN.local with Microsoft SMTPSVC(6.0.3790.4675); Mon, 4 Jul 2011 14:58:45 +0200 Received: from WIN-EXCHANGE-01.MENDIXDOMAIN.local (10.140.10.59) by Win-Exchange-02.MENDIXDOMAIN.local (10.140.10.10) with Microsoft SMTP Server (TLS) id 14.0.639.21; Mon, 4 Jul 2011 14:58:45 +0200 Received: from WIN-EXCHANGE-02.MENDIXDOMAIN.local ([fe80::28b6:d20d:c308:279b]) by Win-Exchange-01.MENDIXDOMAIN.local ([fe80::5478:cd59:e3af:c3c0%14]) with mapi; Mon, 4 Jul 2011 14:58:45 +0200 From: David Hartveld To: "pgsql-testers@postgresql.org" Subject: Streaming replication on 9.1-beta2 after pg_restore is very slow Thread-Topic: Streaming replication on 9.1-beta2 after pg_restore is very slow Thread-Index: Acw6R2dquteyki3uRXSx9XzBreGjtg== Date: Mon, 4 Jul 2011 12:58:44 +0000 Message-ID: <0317654684C3CF48B06D8FF5AE5D2EE0CBBE@Win-Exchange-02.MENDIXDOMAIN.local> Accept-Language: nl-NL, en-US Content-Language: nl-NL X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: multipart/alternative; boundary="_000_0317654684C3CF48B06D8FF5AE5D2EE0CBBEWinExchange02MENDIX_" MIME-Version: 1.0 X-OriginalArrivalTime: 04 Jul 2011 12:58:45.0774 (UTC) FILETIME=[1BF20AE0:01CC3A4A] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.42 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FS_REPLICA=3.599, HTML_MESSAGE=0.001, SARE_SPEC_REPLICA=0.72 X-Spam-Level: ** X-Archive-Number: 201107/1 X-Sequence-Number: 250 --_000_0317654684C3CF48B06D8FF5AE5D2EE0CBBEWinExchange02MENDIX_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi all, I am experimenting with (synchronous) streaming replication on postgresql 9= .1 beta 2 and am having performance problems. I have initially set up an (a= synchronous) streaming replication master cluster with postgresql 9.0, whic= h streamed to a single slave cluster. This seemed to work quite well. Then = I've mostly copied the configuration to a 9.1 beta 2 cluster (master and sl= ave) to see how synchronous replication would behave. The master cluster, when empty after an initdb (pg_createcluster on debian)= seems to properly stream changes to one or more slave clusters when correc= tly set up. I watch the master and slave with pg_current_xlog_location() on= master and pg_last_xlog_receive_location() and pg_last_xlog_replay_locatio= n(). It seems that slaves pick up changes, such as a simple database creati= on, or updating a role password, or adding a role. But when I then do a res= toredb on the master, the slaves quickly fall behind and only very slowly = catch up (after maybe an hour or something...) The log on the slave is filled with statements similar to the following: LOG: streaming replication successfully connected to primary LOG: record with zero length at 0/9B7A010 FATAL: terminating walreceiver process due to administrator command The log file also contains the following line a number of times (with the n= umbers of course a bit different every time): LOG: invalid magic number 0000 in log file 0, segment 9, off= set 10878976 The log on the master contains several lines with: LOG: could not send data to client: Connection reset by pee= r Is there possibly a known issue with the beta, or do I have to configure my= cluster differently for 9.1? I'm a bit at a loss, and would appreciate any= comments. Thanks, David Hartveld --_000_0317654684C3CF48B06D8FF5AE5D2EE0CBBEWinExchange02MENDIX_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi all,

=  

I am experim= enting with (synchronous) streaming replication on postgresql 9.1 beta 2 an= d am having performance problems. I have initially set up an (asynchronous)= streaming replication master cluster with postgresql 9.0, which streamed t= o a single slave cluster. This seemed to work quite well. Then I’ve m= ostly copied the configuration to a 9.1 beta 2 cluster (master and slave) t= o see how synchronous replication would behave.

 

The master cluster, when empty after an initdb (= pg_createcluster on debian) seems to properly stream changes to one or more= slave clusters when correctly set up. I watch the master and slave with pg= _current_xlog_location() on master and pg_last_xlog_receive_location() and = pg_last_xlog_replay_location(). It seems that slaves pick up changes, such = as a simple database creation, or updating a role password, or adding a rol= e. But when I then do a restoredb on the master,  the slaves quickly f= all behind and only very slowly catch up (after maybe an hour or something.= ..)

 = ;

The log on the sl= ave is filled with statements similar to the following:

LOG:= streaming replication successfully connected to primary<= /p>

LOG= :  record with zero length at 0/9B7A010

FATAL:  t= erminating walreceiver process due to administrator command

The log file also contains th= e following line a number of times (with the numbers of course a bit differ= ent every time):

            =    LOG: invalid magic number 0000 in log file 0, segment 9, offse= t 10878976

 

The log on= the master contains several lines with:

        =        LOG:  could not send data to clie= nt: Connection reset by peer

 

Is there possibly a known issue with the beta, or do I have to con= figure my cluster differently for 9.1? I’m a bit at a loss, and would= appreciate any comments.

 

Thanks,

D= avid Hartveld

=  

= --_000_0317654684C3CF48B06D8FF5AE5D2EE0CBBEWinExchange02MENDIX_--