Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iDBOo-00081K-Pk for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Sep 2019 17:48:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iDBOn-0003kC-Kq for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Sep 2019 17:48:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iDBOn-0003k5-3D for pgsql-hackers@lists.postgresql.org; Wed, 25 Sep 2019 17:48:21 +0000 Received: from mail-io1-xd41.google.com ([2607:f8b0:4864:20::d41]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iDBOj-0004Cg-4N for pgsql-hackers@postgresql.org; Wed, 25 Sep 2019 17:48:20 +0000 Received: by mail-io1-xd41.google.com with SMTP id b136so1059013iof.3 for ; Wed, 25 Sep 2019 10:48:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=EDZQPeQCwE7dPmX0cfGsHYgweBlPeEYvodEdO5pMpX4=; b=AO2/WI45/5NjviTe6NaE5FqwFg2jKVIpYArUcGScOlljJVJJ2d9ftBsrDCxP4ybCRN iV2gLN6QHt2uQ7uuo8AmSMVp/SuGtC1jcFdHxAuKA/WYO4bbWCE4kiJcAyISWKsVthbG c3BWBJRcSUei3yS7KBf45QwrSjuKBy6w9VbVH3TItMGMReM+cFBDLtyUs6OUss6KrvdU M8ZOSK9C8JQZNUP+qJBet6p7BvkIiU3ALi6QI+pUkeEKt3rPINHpN9+aLtres7UgIonc WTD5yvvxiI8dBUhH1TvsdvX6jXQKO7qXrWiCUGiPH8i8z+89jo0uSq6bpLhjEF02rW9Q eYhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=EDZQPeQCwE7dPmX0cfGsHYgweBlPeEYvodEdO5pMpX4=; b=To4b+BWdP4CP1gHguFTZxsB3F8sNKRT9pKmBQvsQzHFKiOZeQw/sEL0EqpCxD/m299 bmsBb6225UpJhAyysMEqbbMtAWspRQe9qRYMrbjW2zkR9pMsjvxNXg+ewf6mUWFERu6I aCH/AT8fjGZJrGtRiqDjAEoyR+IBIUn59z12iTVLhdfbG8VOvUo+hfDBkei7RziqlSkz snva8qnkCFo2ELFADGwgZJlbGpg5O9shP65pnYZLV9QYRdyzD9ZfGOp7woZeYFJIwrzc tPxO0A3zfPKVNJj+vtVcn4eS0/wdoJbk1ukzaE4IDx3VA+xmNPgoKK4C70bmTT9R09tw e7vw== X-Gm-Message-State: APjAAAX4/J+Kbu4oxZDbSxIgwxdPNh0aXj+/tIpemDorpMYQn5SvCHho nQLraYc/2DJ0Y8GkiDhh2dMqCg== X-Google-Smtp-Source: APXvYqzzXnGUeXjRPPEnebJ97bi58Q3ESArQmvRKtLyC+90osa2wTWzKAbqqLk282H6rKlme6K2MMw== X-Received: by 2002:a92:48c7:: with SMTP id j68mr1339292ilg.262.1569433696309; Wed, 25 Sep 2019 10:48:16 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([199.229.249.165]) by smtp.gmail.com with ESMTPSA id q3sm327654ilb.8.2019.09.25.10.48.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Sep 2019 10:48:15 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id B53A01206A6; Wed, 25 Sep 2019 14:48:12 -0300 (-03) Date: Wed, 25 Sep 2019 14:48:12 -0300 From: Alvaro Herrera To: Paul Guo Cc: Michael Paquier , Thomas Munro , pgsql-hackers , Jimmy Yih , Ashwin Agrawal , Alexey Kondratov Subject: Re: Two pg_rewind patches (auto generate recovery conf and ensure clean shutdown) Message-ID: <20190925174812.GA4916@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk CC Alexey for reasons that become clear below. On 2019-Sep-25, Paul Guo wrote: > > Question about 0003. If we specify --skip-clean-shutdown and the cluter > > was not cleanly shut down, shouldn't we error out instead of trying to > > press on? > > pg_rewind would error out in this case, see sanityChecks(). > Users are expected to clean up themselves if they use this argument. Ah, good. We should have a comment about that below the relevant stanza, I suggest. (Or maybe in the same comment that ends in line 272). I pushed 0001 with a few tweaks. Nothing really substantial, just my OCD that doesn't leave me alone ... but this means your subsequent patches need to be adjusted. One thing is that that patch touched pg_rewind for no reason (those changes should have been in 0002) -- dropped those. Another thing in 0002 is that you're adding a "-R" switch to pg_rewind, but we have another patch in the commitfest using the same switch for a different purpose. Maybe you guys need to get to an agreement over who uses the letter :-) Also, it would be super helpful if you review Alexey's patch: https://commitfest.postgresql.org/24/1849/ This line is far too long: + printf(_(" -s, --skip-clean-shutdown skip running single-mode postgres if needed to make sure target is clean shutdown\n")); Can we make the description more concise? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services