pg.ddx.io  pgsql-testers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Streaming replication on 9.1-beta2 after pg_restore is very slow
3+ messages / 3 participants
[nested] [flat]

* Streaming replication on 9.1-beta2 after pg_restore is very slow
@ 2011-07-04 12:58  David Hartveld <David.Hartveld@mendix.com>
  0 siblings, 1 reply; 3+ messages in thread

From: David Hartveld @ 2011-07-04 12:58 UTC (permalink / raw)
  To: pgsql-testers

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 (asynchronous) streaming replication master cluster with postgresql 9.0, which 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 slave) 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 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 role. But when I then do a restoredb 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 numbers of course a bit different every time):
               LOG: invalid magic number 0000 in log file 0, segment 9, offset 10878976

The log on the master contains several lines with:
               LOG:  could not send data to client: Connection reset by peer

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

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Streaming replication on 9.1-beta2 after pg_restore is very slow
@ 2011-07-07 16:10  Josh Berkus <josh@agliodbs.com>
  parent: David Hartveld <David.Hartveld@mendix.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Josh Berkus @ 2011-07-07 16:10 UTC (permalink / raw)
  To: pgsql-testers

David,

> The log on the master contains several lines with:
>                LOG:  could not send data to client: Connection reset by peer

I haven't had time to test this myself yet.

One question though: is it possible that you have significant network
issues on your setup?

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Streaming replication on 9.1-beta2 after pg_restore is very slow
@ 2011-07-08 08:19  David Hartveld <david.hartveld@mendix.com>
  parent: Josh Berkus <josh@agliodbs.com>
  0 siblings, 0 replies; 3+ messages in thread

From: David Hartveld @ 2011-07-08 08:19 UTC (permalink / raw)
  To: Josh Berkus <josh@agliodbs.com>; +Cc: pgsql-testers

Op 07-07-11 18:10, Josh Berkus schreef:
>> The log on the master contains several lines with:
>>                 LOG:  could not send data to client: Connection reset by peer
>
> I haven't had time to test this myself yet.
>
> One question though: is it possible that you have significant network
> issues on your setup?

On pgsql-general, the following discussion has probably brought me to a 
solution (my binaries (from debian experimental) were built with a GCC 
version that contained an optimization bug): 
http://archives.postgresql.org/pgsql-general/2011-07/msg00175.php

Thanks for your interest!
David



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2011-07-08 08:19 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-07-04 12:58 Streaming replication on 9.1-beta2 after pg_restore is very slow David Hartveld <David.Hartveld@mendix.com>
2011-07-07 16:10 ` Josh Berkus <josh@agliodbs.com>
2011-07-08 08:19   ` David Hartveld <david.hartveld@mendix.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox