Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UXGSK-0004vi-81 for pgsql-admin@arkaria.postgresql.org; Tue, 30 Apr 2013 19:43:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UXGSJ-0002rp-2B for pgsql-admin@arkaria.postgresql.org; Tue, 30 Apr 2013 19:43:15 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UXGSH-0002rU-Tc for pgsql-admin@postgresql.org; Tue, 30 Apr 2013 19:43:14 +0000 Received: from mail.journyx.com ([209.163.206.41] helo=mail.int.journyx.com) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UXGS8-00077C-NV for pgsql-admin@postgresql.org; Tue, 30 Apr 2013 19:43:10 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.int.journyx.com (Postfix) with ESMTP id BC43DC42B8 for ; Tue, 30 Apr 2013 14:43:03 -0500 (CDT) X-Virus-Scanned: amavisd-new at zimbra.int.journyx.com Received: from mail.int.journyx.com ([127.0.0.1]) by localhost (mail.int.journyx.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Yww+yO4FSIqY for ; Tue, 30 Apr 2013 14:42:58 -0500 (CDT) Received: from mail.int.journyx.com (zimbra.int.journyx.com [192.168.100.5]) by mail.int.journyx.com (Postfix) with ESMTP id 55C69C42C2 for ; Tue, 30 Apr 2013 14:42:58 -0500 (CDT) Date: Tue, 30 Apr 2013 14:42:58 -0500 (CDT) From: Scott Whitney Reply-To: Scott Whitney To: pgsql-admin@postgresql.org Message-ID: <6985793.109694.1367350978060.JavaMail.root@mail.int.journyx.com> Subject: Some replication-related notes and questions MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_109693_31183058.1367350978057" X-Originating-IP: [192.168.100.188] X-Mailer: Zimbra 7.2.3_GA_2872 (ZimbraWebClient - GC26 (Win)/7.2.3_GA_2872) X-Pg-Spam-Score: -4.4 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org ------=_Part_109693_31183058.1367350978057 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit We recently moved to PG 9.2.4 (from 8.4.4) to take advantage of replication, and I have to say it's pretty awesome. I ran into some things that I was hoping someone could clarify. a) There appears to be no way to tell how "far behind" my standby servers are. That is, I can find a checkpoint with pg_controldata. I can find the sending/receiving WAL processes via ps or replay/receive_location(). However there seems to be no correlation to real-world times or dates as in "how many seconds/minutes/hours behind are my standby servers." b) This segues nicely into the archive_status/*.done files. The _only_ files in my archive_status directory on my standby servers are .done files. Will these clean up on their own? Can I stat the last one to know the maximum discrepancy between my master and slave? If they do NOT clean up on their own, is it safe to remove them? I couldn't find any information on what that directory specifically does or whether .done files are required. c) It would appear that a FULL vacuum can hose replication (in the case of a long-standing hanging transaction). Has anyone else run into this? Specifically, my standby was up and running and replicating. Sunday morning (I do full vacuums on Saturday due to an old bug in an old database) my standby was trying to replay a WAL file that didn't exist because I had hanging transactions that began before my oldest WAL segment. Since the replication was up and running on Saturday, I was wondering whether full vacuum could have been to blame for the servers getting out ot sync. Thanks, Scott Whitney ------=_Part_109693_31183058.1367350978057 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <= div style=3D'font-family: times new roman,new york,times,serif; font-size: = 12pt; color: #000000'>We recently moved to PG 9.2.4 (from 8.4.4) to take ad= vantage of replication, and I have to say it's pretty awesome.

I ran into some things that I was hoping someone could clarify.

a) There appears to be no way to tell how "far behind"= my standby servers are. That is, I can find a checkpoint with pg_controlda= ta. I can find the sending/receiving WAL processes via ps or replay/receive= _location(). However there seems to be no correlation to real-world times o= r dates as in "how many seconds/minutes/hours behind are my standby servers= ."

b) This segues nicely into the archive_status/*= .done files. The _only_ files in my archive_status directory on my standby = servers are .done files. Will these clean up on their own? Can I stat the l= ast one to know the maximum discrepancy between my master and slave? If the= y do NOT clean up on their own, is it safe to remove them? I couldn't find = any information on what that directory specifically does or whether .done f= iles are required.

c) It would appear that a FULL = vacuum can hose replication (in the case of a long-standing hanging transac= tion). Has anyone else run into this? Specifically, my standby was up and r= unning and replicating. Sunday morning (I do full vacuums on Saturday due t= o an old bug in an old database) my standby was trying to replay a WAL file= that didn't exist because I had hanging transactions that began before my = oldest WAL segment. Since the replication was up and running on Saturday, I= was wondering whether full vacuum could have been to blame for the servers= getting out ot sync.

Thanks,
Scott Whit= ney

------=_Part_109693_31183058.1367350978057--