Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eXXQI-0003et-Ue for pgsql-admin@arkaria.postgresql.org; Fri, 05 Jan 2018 19:12:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eXXQI-0000IE-8y for pgsql-admin@arkaria.postgresql.org; Fri, 05 Jan 2018 19:12:58 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eXXQH-0000Hx-Ga for pgsql-admin@lists.postgresql.org; Fri, 05 Jan 2018 19:12:58 +0000 Received: from resqmta-ch2-12v.sys.comcast.net ([2001:558:fe21:29:69:252:207:44]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eXXQD-0006yd-Hq for pgsql-admin@postgresql.org; Fri, 05 Jan 2018 19:12:55 +0000 Received: from resomta-ch2-20v.sys.comcast.net ([69.252.207.116]) by resqmta-ch2-12v.sys.comcast.net with ESMTP id XXPHewx6Qtf6bXXQAe39im; Fri, 05 Jan 2018 19:12:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1515179570; bh=ZqZrIOx4cvTTp+5pC02zqqlRGtv5rQPWmwANGYhRdtk=; h=Received:Received:Received:From:To:Subject:Date:Message-ID: MIME-Version:Content-Type; b=Z8OwDmQJ10QZYRpREY70MlRy0Q//M+eQMn8nvugcCOKUgkbCy+OOBzjUXNSPWaG99 3/dRFrdRzBkzUVpLX/0zWMbGm3pI/ZPDlGbZU88EYGGwrMWZFMhdh2mMjK7o0pTXj8 2Z17D8o1r5NlTXYwNa5FA5th6921bBLL0PWroPPEeMX2CfEsbavup0/qzDU9cIacMF V+a6FR509wjhd3fdM4vZhBsQQ8cSNcjih0D7v1MP1RlMXT5JDSUdgNuzapb6i9YyLY Uo6/Rx/bdJF1XFwBHCUcHbmpweyZbK3MfwcB7F1EN1hgxKrO2NGiL1kU1TCtgtiDAO z9uvxpH0FD8Yg== Received: from jsievers.comcast.net ([12.30.159.20]) by resomta-ch2-20v.sys.comcast.net with SMTP id XXPxeSe1FzYOCXXQ0eBLdK; Fri, 05 Jan 2018 19:12:48 +0000 Received: from jsievers.enova.com (localhost [127.0.0.1]) by jsievers.comcast.net (Postfix) with ESMTP id C5A2726005E; Fri, 5 Jan 2018 13:12:37 -0600 (CST) From: Jerry Sievers To: Rui DeSousa Cc: Jerry Sievers , pgsql-admin@postgresql.org Subject: Re: pg_rewind: confused about recovery.conf/restore_command References: <87fu7khohy.fsf@jsievers.enova.com> <6EFCAFA0-3555-4F44-A059-3361586984D4@icloud.com> Date: Fri, 05 Jan 2018 13:12:37 -0600 In-Reply-To: <6EFCAFA0-3555-4F44-A059-3361586984D4@icloud.com> (Rui DeSousa's message of "Fri, 05 Jan 2018 09:55:40 -0500") Message-ID: <878tdcqfve.fsf@jsievers.enova.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-CMAE-Envelope: MS4wfPvGI0ICLIrqnY2fts15mGkyfbDBCnhPqQbElR7+bU5vtpWaS+edBySIP/aVFPCUwDC08KZCQPA5HiXVFF1W+bArL1uPc/9vRo59eX0RqY4T1UbFnxp3 Xq/gxtueUZdRCYYhR4V8CIgN3wejxJujR/xh/ak16KDWIZDGhQbYZanl0qBIquK8LjbGsaeEyesYgclCC/IcLWtoL0c4hcRzXXMDQDTCbymTtRMONXWb0R6A YaapL48wRI9qSpuzoaM7KA== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Rui DeSousa writes: > Hi Jerry, > > That has been my experience as well; pg_rewind does not fetch the WAL > files. Hmmm, just prior to my email here last night was my 2nd attempt, taking a few hours of r/d time to eventually conclude that I was misunderstanding the docs :-) A few mentions of recovery.conf in the docs themselves plus what I found searching Google certainly left me with the impression that pg_rewind itself knows how to try using a restore_command if found in a recovery.conf file of the target system to fetch WALs. > You can use following parameter to keep the most recent logs; i.e. a > couple of hours worth. That will allow pg_rewind to work during that Yup this is obvious and I tested same with OK results. > time frame =E2=80=94 If it is still missing a WAL file or two you can > manually copy them over in a pinch. Yes and in fact I used my restore_command to do so. > > wal_keep_segments=20 > > > p.s. I switched to using ZFS snapshots instead. Oh, my site is quite familiar with FS or SAN/array snapshots and we use them all the time. Just felt like pg_rewind looked like something we should try. I'll wait to see if others can shed more light on this. Thanks > > --=20 Jerry Sievers Postgres DBA/Development Consulting e: postgres.consulting@comcast.net p: 312.241.7800