Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WzqJ9-0004Yg-BB for pgsql-admin@arkaria.postgresql.org; Wed, 25 Jun 2014 16:44:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WzqJ8-0004WF-Qo for pgsql-admin@arkaria.postgresql.org; Wed, 25 Jun 2014 16:44:26 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WzqJ6-0004T6-Jh for pgsql-admin@postgresql.org; Wed, 25 Jun 2014 16:44:24 +0000 Received: from imx3.etecsa.cu ([200.55.152.137]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WzqIx-00083S-L5 for pgsql-admin@postgresql.org; Wed, 25 Jun 2014 16:44:22 +0000 Received: from Unknown ([192.168.91.42] helo=mn2.etecsa.cu) by imx3.etecsa.cu with ESMTP id sCgGxePj95947; Wed, 25 Jun 2014 12:42:16 -0500 Received: (qmail 31815 invoked by uid 11185); 25 Jun 2014 17:42:21 -0000 Received: from 192.168.91.6 by mn2.etecsa.cu (envelope-from , uid 502) with qmail-scanner-2.08 (spamassassin: 3.2.5. Clear:RC:1(192.168.91.6):. Processed in 0.080394 secs); 25 Jun 2014 17:42:21 -0000 Received: from unknown (HELO webmail.etecsa.cu) ([192.168.91.6]) (envelope-sender ) by mn2.etecsa.cu (qmail-ldap-1.03) with SMTP for ; 25 Jun 2014 17:42:21 -0000 Received: from 192.168.207.54 (SquirrelMail authenticated user gilberto.castillo) by webmail.etecsa.cu with HTTP; Wed, 25 Jun 2014 12:42:15 -0500 (GMT+5) Message-ID: <43325.192.168.207.54.1403718135.squirrel@webmail.etecsa.cu> In-Reply-To: <53AADF59.50000@gmail.com> References: <53A9B567.5070301@gmail.com> <53A9C139.2040704@gmail.com> <3709F6AF-032E-4095-B0CB-DC1CE36F6B4B@breakthroughfuel.com> <53AADF59.50000@gmail.com> Date: Wed, 25 Jun 2014 12:42:15 -0500 (GMT+5) Subject: Re: Wal archive way behind in streaming replication From: "Gilberto Castillo" To: "John Scalia" Cc: "Andrew Krause" , "pgsql-admin@postgresql.org" Reply-To: gilberto.castillo@etecsa.cu User-Agent: SquirrelMail/1.4.8-5.el5_4.10 MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal X-SpamTest-Envelope-From: gilberto.castillo@etecsa.cu X-SpamTest-Info: Profiles 63066 [Jun 25 2014] X-SpamTest-Method: none X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0285], KAS30/SDK/Release X-Anti-Virus: Kaspersky Mail Gateway, version: 5.6.28/RELEASE, bases: 20140401T050822 #7726142, check: 20140625 clean Content-Type: multipart/mixed; boundary="=sCgGx0EV17434=imx3.etecsa.cu=" X-Pg-Spam-Score: -1.9 (-) 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 This is a multi-part message in MIME format. --=sCgGx0EV17434=imx3.etecsa.cu= Content-Disposition: inline Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit Stop to Master, copy folder pg_xlog you slave. To me it has worked for me > > A little examination of the pgarch.c file showed what the archive process > on the primary is doing. Anyway, to ensure that the primary knows that it > has transmitted all the up to > date WALs, I went into the primary's data/pg_xlog/archive_status directory > and performed "touch 00000003000000900000036.ready" and repeated this > command for the other WALs up to > *44.ready. This really shouldn't have been a problem as the most recent > WAL file in pg_xlog was *45. The archiver then picked up all those WAL > files and transmitted them to the > standbys. At least I saw them appear on the standby in the directory > specified in the recovery.conf file. > > Now, what I really don't understand is the standby's behavior. After the > WALs arrived, I saw nothing in today's pg_log/Wed.log file showing it saw > them. I then issued a service > postgresql-9.3 restart and this is what was spit out in the log: > > LOG: entering standby mode > LOG: restored log file "00000000300000000900000035" from archive > LOG: unexpected pageaddr 9/1B000000 in log segment > 00000000300000000900000035, offset 0 > LOG: started streaming WAL from primary at 9/35000000 on timeline 3 > FATAL: the database system is starting up > LOG: consistent recovery state reached at 9/350000C8 > LOG: redo starts at 9/350000C8 > LOG: database system is ready to accept read only connections > > Two things stand out here. First, the standby didn't seem to process the > newly arrived WAL files, and second. what's with the FATAL: in the > logfile? > -- > Jay > > On 6/24/2014 2:52 PM, Andrew Krause wrote: >> You shouldn’t have to touch the files as long as they aren’t compressed. >> You may have to restart the standby instance to get the recovery to >> begin though. I’d suggest tailing your instance log and restarting the >> standby instance. It should show that the logs from the gap are >> applying right away at startup. >> >> >> Andrew Krause >> >> >> >> >> On Jun 24, 2014, at 1:19 PM, John Scalia wrote: >> >>> Ok, I did the copy from pg_xlog directory into the restore.conf >>> specifieddirectory. The standby servers seem fine with that, however, >>> just copying does not inform the primary that >>> the copy has happened. The archive_status directory under pg_xlog on >>> the primary still thinks the last WAL sent was *B7 and yet it's now >>> writing *C9. When I did the copy it was >>> only up to *C7 and nothing else has shown in the standby's directory. >>> >>> Now, the *.done files in archive_status are just zero length, but I'm a >>> bit hesitant to just do a touch for the ones I manually copied as I >>> don't know if this is from an in-memory >>> queue or if it Postgresql reads the contents of this regularly in order >>> to decide what to copy. >>> >>> Is that safe to do? >>> >>> On 6/24/2014 9:56 AM, Andrew Krause wrote: >>>> You can copy all of the WAL logs from your gap to the standby. If you >>>> place them in the correct location (directory designated for restore) >>>> theinstance will automatically apply them all. >>>> >>>> >>>> Andrew Krause >>>> >>>> >>>> >>>> On Jun 23, 2014, at 9:24 AM, John Scalia >>>> wrote: >>>> >>>>> Came in this morning to numerous complaints from pgpool about the >>>>> standby servers being behind from the primary. Looking into it, no >>>>> WAL files had been transferred since late Friday. All I did was >>>>> restart the primaryand the WAL archving resumed, however, looking at >>>>> the WAL files on the standby servers, this is never going to catch >>>>> up. Now, I've got the archive_timeout on the primary = 600 or 10 >>>>> minutes and I see WAL files in pg_xlog every 10 minutes. As they show >>>>> up on the standby servers, they're also 10 minutes apart, but the >>>>> primary is writing *21 and the standby's areonly up to *10. Now, like >>>>> I said prior, with there being 10 minutes (600seconds) between >>>>> transfers (the same pace as the WALs are generated) it will never >>>>> catch up. Is this really the intended behavior? How would I get the >>>>> additional WAL files over to the standbys without waiting 10 minutes >>>>> to copy them one at a time? >>>>> -- >>>>> Jay >>>>> >>>>> >>>>> -- >>>>> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) >>>>> To make changes to your subscription: >>>>> http://www.postgresql.org/mailpref/pgsql-admin >>> >>> >>> >>> >>> >>> -- >>> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) >>> To make changes to your subscription: >>> http://www.postgresql.org/mailpref/pgsql-admin >> > > > > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin--- > This message was processed by Kaspersky Mail Gateway 5.6.28/RELEASE > running at host imx2.etecsa.cu > Visit our web-site: , > Saludos, Gilberto Castillo La Habana, Cuba --=sCgGx0EV17434=imx3.etecsa.cu= Content-Type: text/plain Content-Disposition: inline --- This message was processed by Kaspersky Mail Gateway 5.6.28/RELEASE running at host imx3.etecsa.cu Visit our web-site: , --=sCgGx0EV17434=imx3.etecsa.cu= Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin --=sCgGx0EV17434=imx3.etecsa.cu=--