Re: Streaming replication with sync slave, but disconnects due to missing WAL segments

From: Mads(dot)Tandrup(at)schneider-electric(dot)com
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Streaming replication with sync slave, but disconnects due to missing WAL segments
Date: 2013-06-06 06:26:19
Message-ID: OF148D4CBB.CBAD1ACC-ONC1257B82.00235EA3-C1257B82.00235EA5@apcc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2"><div>Hi</div><div><br></div><div>Thanks for your reply. Do you know of any options that I could give pg_dump/psql to avoid creating one big transaction? I'm using the plain text format for pg_dump.</div><div><br></div><div>Best regards,</div><div>Mads</div><br><br><font color="#990099">-----pgsql-general-owner(at)postgresql(dot)org skrev: -----</font><div style="padding-left:5px;"><div style="padding-right:0px;padding-left:5px;border-left:solid black 2px;">Til: Albe Laurenz &lt;laurenz(dot)albe(at)wien(dot)gv(dot)at&gt;<br>Fra: Jeff Janes <jeff(dot)janes(at)gmail(dot)com><br>Sendt af: pgsql-general-owner(at)postgresql(dot)org<br>Dato: 05-06-2013 12:43<br>Cc: "Mads(dot)Tandrup(at)schneider-electric(dot)com" &lt;Mads(dot)Tandrup(at)schneider-electric(dot)com&gt;, "pgsql-general(at)postgresql(dot)org" &lt;pgsql-general(at)postgresql(dot)org&gt;<br>Emne: Re: [GENERAL] Streaming replication with sync slave, but disconnects due to missing WAL segments<br><br><div dir="ltr">On Wed, Jun 5, 2013 at 1:30 AM, Albe Laurenz <span dir="ltr">&lt;<a href="mailto:laurenz(dot)albe(at)wien(dot)gv(dot)at" target="_blank">laurenz(dot)albe(at)wien(dot)gv(dot)at</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Jeff Janes wrote:<br>
&gt; On Tue, Jun 4, 2013 at 6:25 AM, &lt;<a href="mailto:Mads(dot)Tandrup(at)schneider-electric(dot)com">Mads(dot)Tandrup(at)schneider-electric(dot)com</a>&gt; wrote:<br>
</div><div class="im">&gt;&gt; I have a question about sync streaming replication.<br>
&gt;&gt;<br>
&gt;&gt; I have 2 postgresql 9.1 servers set up with streaming replication. On the<br>
&gt;&gt; master node the slave is configured as a synchronous standby. I've verified<br>
&gt;&gt; that pg_stat_replication shows sync_state = sync for the slave node.<br>
&gt;&gt;<br>
&gt;&gt; It all seems to work fine. But I have noticed that sometimes when I restore<br>
&gt;&gt; backups created by pg_dump. The slave node will disconnect with the message<br>
&gt;&gt; in the postgresql log:<br>
&gt;<br>
&gt; You cannot use pg_dump to set up a database for receiving streaming replication.<br>
&gt;<br>
&gt; For that it must be a physical copy, not a logical copy which is what pg_dump generates.<br>
<br>
</div>I think you misunderstood - he restores a dump on<br>
the *primary* and that makes replication fall over<br>
because it cannot catch up.<br></blockquote><div><br></div><div style="">Ah, I see. &nbsp;And the synchronization point doesn't help, because it only occurs at commit-time and if the dump is being loaded in a single transaction, then the transaction could last for several checkpoints. &nbsp;By the time it tries to synchronize, it is already too late.</div>
<div style=""><br></div><div style="">Cheers,</div><div style=""><br></div><div style="">Jeff</div></div></div></div>
<br clear="both">
______________________________________________________________________<br>
This email has been scanned by the Symantec Email Security.cloud service.<br>
______________________________________________________________________<br>
</jeff(dot)janes(at)gmail(dot)com></div></div><div></div></font>

Attachment Content-Type Size
unknown_filename text/html 3.1 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Colin Sloss 2013-06-06 10:20:06 PostgreSQL Synchronous Replication in production
Previous Message Adrian Klaver 2013-06-06 01:55:04 Re: How to modify dump files created by pg_dump